mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
18 lines
514 B
Plaintext
18 lines
514 B
Plaintext
// #target: macos-x64
|
|
module foo;
|
|
|
|
char[8192] stack;
|
|
char* x = &stack[0] + 1000;
|
|
|
|
fn void test()
|
|
{
|
|
static char[2] y;
|
|
static char* z = &y[1];
|
|
}
|
|
|
|
/* #expect: foo.ll
|
|
|
|
@foo.stack = local_unnamed_addr global [8192 x i8] zeroinitializer, align 16
|
|
@foo.x = local_unnamed_addr global ptr getelementptr (i8, ptr @foo.stack, i64 1000), align 8
|
|
@test.y = internal unnamed_addr global [2 x i8] zeroinitializer, align 1
|
|
@test.z = internal unnamed_addr global ptr getelementptr inbounds (i8, ptr @test.y, i64 1), align 8 |