Files
c3c/test/test_suite/arrays/complex_array_const.c3t

21 lines
706 B
Plaintext

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