Building with Drelease-fast=true
causes extern C structs to contain garbage
#14262
Labels
bug
Observed behavior contradicts documented or intended behavior
Uh oh!
There was an error while loading. Please reload this page.
Zig Version
0.11.0-dev.1253+fcee1bf99
Steps to Reproduce and Observed Behavior
Self-contained testcase can be found here: https://github.com/AlxHnr/zig-compiler-testcase
Building the code with
zig build -Drelease-fast=true test
causes the tests to fail due to scrambled data. Building without optimizations (zig build test
) works just fine.Here is the offending code which you can find in the repo linked above.
Expected Behavior
Optimized release builds behave the same as debug builds.
More informations
Platform: Fedora Linux 36
This seems to be a regression of #1481. There it claims the following:
The text was updated successfully, but these errors were encountered: