-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Description
Zig Version
0.15.1
Steps to Reproduce and Observed Behavior
const std = @import("std");
pub fn main() !void {
var r: i32 = 1;
comptime var c: i32 = 2;
const tuple = .{ &r, &c };
std.debug.print("{}, {}\n", .{ tuple[0].*, tuple[1].* }); // 1, 2
tuple[1].* = 4;
std.debug.print("{}, {}\n", .{ tuple[0].*, tuple[1].* }); // 1, 4
}
Compiles and runs fine with zig run main.zig -fstrip
Segfaults without -fstrip
or without .strip = true
in build.zig.
Possible related issues: #24477, #24592
Expected Behavior
The program should behave consistently with or without the -fstrip
flag, preferably compiling and running successfully, or otherwise producing an explicit compile error.
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior