const
value changes unexpectedly
#19927
Labels
backend-llvm
The LLVM backend outputs an LLVM IR Module.
bug
Observed behavior contradicts documented or intended behavior
miscompilation
The compiler reports success but produces semantically incorrect code.
Milestone
Zig Version
0.12.0
Steps to Reproduce and Observed Behavior
The bug occurs at the
const
variablehas_bug
in the following code.The output of this code is
Expected Behavior
Since the variable
has_bug
marked asconst
, and its type is?u8
, it should printThe text was updated successfully, but these errors were encountered: