2e27407161
I found out there were accidentally two code paths in zig ir for pointer dereference. So this should fix a few bugs. closes #1486
12 lines
232 B
Zig
12 lines
232 B
Zig
const assert = @import("std").debug.assert;
|
|
|
|
const ptr = &global;
|
|
var global: u64 = 123;
|
|
|
|
test "constant pointer to global variable causes runtime load" {
|
|
global = 1234;
|
|
assert(&global == ptr);
|
|
assert(ptr.* == 1234);
|
|
}
|
|
|