-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Segmentation fault compiling inline call with comptime return value (-fstrip
)
#15469
Labels
Milestone
Comments
amp-59
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Apr 26, 2023
|
This doesn't seem to be limited to inline calls, and also applies to tuple initialization. Here are two further related examples, with the debug output from test {
const S = struct { field: u32 };
comptime var arr: [1]S = undefined;
arr[0] = .{ .field = 0 };
}
Debug outputtest {
const S = struct { u32 };
comptime var arr: [1]S = undefined;
arr[0] = .{0};
}
Debug outputThe crashes here are in two different functions, but the failing logic is the same: |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Zig Version
0.11.0-dev.2685+fac120bc3
Steps to Reproduce and Observed Behavior
Compile test program with
zig build-obj -fstrip ./inline_call_comptime_value_stripped.zig
./inline_call_comptime_value_stripped.zig
:Expected Behavior
The text was updated successfully, but these errors were encountered: