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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:a440b382e43203857de9195eb526c4a16f21ceb1

commit r16-3161-ga440b382e43203857de9195eb526c4a16f21ceb1
Author: Richard Biener <rguent...@suse.de>
Date:   Tue Aug 12 09:00:48 2025 +0200

    tree-optimization/121514 - ICE with recent VN improvement

    When inserting a compensation stmt during VN we are making sure to
    register the result for the original stmt into the hashtable so
    VN iteration has the chance to converge and we avoid inserting
    another copy each time.  But the implementation doesn't work for
    non-SSA name values, and is also not necessary for constants since
    we did not insert anything for them.  The following appropriately
    guards the calls to vn_nary_op_insert_stmt as was already done
    in one place.

            PR tree-optimization/121514
            * tree-ssa-sccvn.cc (visit_nary_op): Only call
            vn_nary_op_insert_stmt for SSA name result.

            * gcc.dg/torture/pr121514.c: New testcase.

Reply via email to