[Bug tree-optimization/123596] [13/14/15 Regression] ICE in tree check: expected ssa_name, have var_decl in unlink_stmt_vdef, at tree-ssa-operands.cc:1387 with -O2 flag

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 16 11:45:02 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123596

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:53da069328ee9662518b100181dd5ac59a8f6fad

commit r15-10972-g53da069328ee9662518b100181dd5ac59a8f6fad
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jan 29 10:41:16 2026 +0100

    tree-optimization/123596 - fix partial virtual SSA update in eh_cleanup

    The following replaces the not quite correct use of
    mark_virtual_operand_for_renaming by an appropriate way of dealing
    with a possibly partially up-to-date virtual SSA form.  Namely
    when we just move stmts and not remove a VDEF we should arrange
    for missing virtual PHIs to be created and just queue its arguments
    for possible renaming.  For the testcase at hand there's no renaming
    necessary in the end when done this way.

            PR tree-optimization/123596
            * tree-eh.cc (sink_clobbers): Create a virtual PHI when
            one is required but not present, queuing arguments
            for renaming.

            * g++.dg/torture/pr123596.C: New testcase.

    (cherry picked from commit 4c49f8e53698cce2fc93fb31cbd190c7ff3d04c4)


More information about the Gcc-bugs mailing list