Open edumoot opened 2 months ago
@llvm/issue-subscribers-debuginfo
Author: Yachao Zhu (edumoot)
In LLVM19.1.0 context, for the -O3 binary, the issue seems to be fixed: local_ptr
is optimized out at line 25. we get use of undeclared identifier 'local_ptr'
when trying to print it at line 25.
Godblot link
There are two items needed to be considered:
local_ptr
is referencing differs from the value ofg_values[7]
.local_ptr
, displaying the message: "error: Couldn't materialize: couldn't get the value of variable local_ptr: variable not available error: errored out in DoExecute, couldn't PrepareToExecuteJITExpression".We can reproduce this issue in LLVM versions 18.1.8, 17.0.6, and 16.0.3. The behavior of the binary compiled with -O2 is identical to that of the -O3 binary, so we will use the -O3 binary for demonstration purposes.
cat 434.c
GDB produces a similar issue.