mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
22 lines
735 B
Plaintext
22 lines
735 B
Plaintext
// #target: x64_darwin
|
|
module test;
|
|
|
|
struct Connection
|
|
{
|
|
long to;
|
|
char* type;
|
|
long length;
|
|
}
|
|
|
|
Connection[3] link
|
|
= { {1, "link1", 10},
|
|
{2, "link2", 20},
|
|
{3, "link3", 30} };
|
|
|
|
// #expect: test.ll
|
|
|
|
@.str = private constant [6 x i8] c"link1\00"
|
|
@.str.1 = private constant [6 x i8] c"link2\00"
|
|
@.str.2 = private 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]* @.str, i32 0, i32 0), i64 10 }, %test.Connection { i64 2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i64 20 }, %test.Connection { i64 3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i64 30 }], align 16
|