Files
c3c/test/test_suite/arrays/complex_array_const.c3t
Christoffer Lerno 25bccf4883 New faults and syntax (#2034)
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00

23 lines
767 B
Plaintext

// #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 9, i64 0, 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 = internal 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