[Bug ipa/114274] ICE: tree check: expected block, have ggc_freed in inlining_chain_to_json, at optinfo-emit-json.cc:284 with -fsave-optimization-record
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 6 08:26:03 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114274
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Priority|P1 |P3
Status|NEW |ASSIGNED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The block is eventually collected after EVRP, and earlier the scope block was
removed as unused. But <var_decl 0x7ffff702fc78 CSWTCH.23> still refers
to it via it's DECL_SOURCE_LOCATION which is picked from the gswitch
location but not stripped from BLOCK and the variable is not added to the
block tree either (not sure why it should get any).
Testing fix, the decl is DECL_IGNORED_P, has NULL DECL_CONTEXT, so just use
UNKNOWN_LOCATION here.
More information about the Gcc-bugs
mailing list