mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
18 lines
533 B
C
18 lines
533 B
C
// #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 ([2 x i8], ptr @"test$y", i64 0, i64 1), align 8
|