https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2024-01-12 Status|UNCONFIRMED |NEW Summary|[13 Regression] ICE during |[13 Regression] ICE during |gimplification building TVM |gimplification building TVM | |since | |r13-8079-gd237e7b291ff52 CC| |jason at gcc dot gnu.org --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- (gdb) p debug_tree (*expr_p) <modify_expr 0x7ffff6bd35c8 type <boolean_type 0x7ffff6a2eb28 bool public unsigned type_6 QI size <integer_cst 0x7ffff6a300c0 constant 8> unit-size <integer_cst 0x7ffff6a300d8 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff6a2eb28 precision:1 min <integer_cst 0x7ffff6a30318 0> max <integer_cst 0x7ffff6a30348 1>> side-effects readonly arg:1 <integer_cst 0x7ffff6a30318 type <boolean_type 0x7ffff6a2eb28 bool> constant 0>> so the LHS of the MODIFY_EXPR is NULL. This is built by finalize_nrv_r: /* If a cleanup might throw, we need to clear current_retval_sentinel on the exception path so an outer cleanup added by maybe_splice_retval_cleanup doesn't run. */ if (cp_function_chain->throwing_cleanup) { tree clear = build2 (MODIFY_EXPR, boolean_type_node, current_retval_sentinel, boolean_false_node); /* We're already only on the EH path, just prepend it. */ tree &exp = CLEANUP_EXPR (*tp); exp = build2 (COMPOUND_EXPR, void_type_node, clear, exp); and current_retval_sentinel is NULL here. Caused by the backport of PR112301, r13-8079-gd237e7b291ff52.