Files
c3c/test/test_suite/compile_time/compile_time_array_ref.c3t
2023-01-11 18:00:08 +01:00

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