Files
c3c/test/test_suite/arrays/complex_array_const.c3t
Christoffer Lerno b794c893d6 Dynamic dispatch.
2023-05-25 22:28:45 +02:00

23 lines
762 B
C

// #target: macos-x64
module test;
struct Connection
{
long to;
char* type;
long length;
}
Connection[3] link @private
= { {1, "link1", 10},
{2, "link2", 20},
{3, "link3", 30} };
/* #expect: test.ll
@"$ct.test.Connection" = linkonce global %.introspect { i8 10, ptr null, i64 24, i64 0, i64 3, [0 x i64] zeroinitializer }, align 8
@.str = private unnamed_addr constant [6 x i8] c"link1\00", align 1
@.str.1 = private unnamed_addr constant [6 x i8] c"link2\00", align 1
@.str.2 = private unnamed_addr constant [6 x i8] c"link3\00", align 1
@test.link = protected unnamed_addr global [3 x %Connection] [%Connection { i64 1, ptr @.str, i64 10 }, %Connection { i64 2, ptr @.str.1, i64 20 }, %Connection { i64 3, ptr @.str.2, i64 30 }], align 16