Files
c3c/test/test_suite/arrays/complex_array_const.c3t
2021-11-16 17:46:44 +01:00

22 lines
762 B
C

// #target: x64-darwin
module test;
struct Connection
{
long to;
char* type;
long length;
}
private global Connection[3] link
= { {1, "link1", 10},
{2, "link2", 20},
{3, "link3", 30} };
// #expect: test.ll
@.str = private constant [6 x i8] c"link1\00", align 1
@.str.1 = private constant [6 x i8] c"link2\00", align 1
@.str.2 = private constant [6 x i8] c"link3\00", align 1
@test.link = protected global [3 x %Connection] [%Connection { i64 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i64 10 }, %Connection { i64 2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i64 20 }, %Connection { i64 3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i64 30 }], align 16