[Bug tree-optimization/116747] [13/14/15/16 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 29 11:38:10 GMT 2026


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

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

https://gcc.gnu.org/g:312ba8d740bb4302a038e11c45891addf0c7e9f9

commit r16-7135-g312ba8d740bb4302a038e11c45891addf0c7e9f9
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jan 29 08:47:44 2026 +0100

    tree-optimization/116747 - ICE in cselim due to duplicate sinking

    The following avoids queueing duplicate stmts in the set of sinkings
    to consider as well as pick candidates in an order that ensures
    we don't unnecessarily re-order stores.  While we currently only can
    trigger the ICE with out-of-bound accesses future enhancements
    to how we deal with dependence analysis in this pass could expose
    the issue to a wider range of testcases, so this makes it future-proof.

            PR tree-optimization/116747
            * tree-ssa-phiopt.cc (cond_if_else_store_replacement): Avoid
            duplicate stmts in the set of store pairs to process.

            * gcc.dg/tree-ssa/cselim-4.c: New testcase.


More information about the Gcc-bugs mailing list