Files
c3c/test/test_suite/expressions/deref_const_string.c3t
Christoffer Lerno 0d7697280c Fix of test (again)
2025-02-17 00:22:21 +01:00

30 lines
778 B
Plaintext

// #target: macos-x64
module test;
import std;
const char *VOWS = "aeiou";
const char *CONS = "bcdfghjklmnpqrstvwxyz";
const char *TEST = "";
fn int main (String[] args)
{
char a = *VOWS;
char b = *CONS;
char c = *TEST;
return 0;
}
/* #expect: test.ll
@.str = private unnamed_addr constant [6 x i8] c"aeiou\00", align 1
@test.VOWS = local_unnamed_addr constant ptr @.str, align 8
@.str.3 = private unnamed_addr constant [22 x i8] c"bcdfghjklmnpqrstvwxyz\00", align 1
@test.CONS = local_unnamed_addr constant ptr @.str.3, align 8
@.str.4 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
@test.TEST = local_unnamed_addr constant ptr @.str.4, align 8
store i8 97, ptr %a, align 1
store i8 98, ptr %b, align 1
store i8 0, ptr %c, align 1
ret i32 0