stage2: address of threadlocal variable is not comptime known

Closes #13215
This commit is contained in:
Veikka Tuominen
2022-11-04 23:12:34 +02:00
parent f96748ebc1
commit ea48f06fc2
3 changed files with 61 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
threadlocal var global: u32 = 23;
threadlocal var global_ptr: *u32 = &global;
pub export fn entry() void {
if (global_ptr.* != 23) unreachable;
}
// error
// backend=stage2
// target=native
//
// :2:36: error: unable to resolve comptime value
// :2:36: note: container level variable initializers must be comptime-known