[Bug tree-optimization/125786] [13/14/15 Regression] wrong code (SIGFPE) at -O2 on x86_64-linux-gnu

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125786

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

https://gcc.gnu.org/g:7902a49cfca20a69e9dbe757bfba426eeaeab552

commit r15-11489-g7902a49cfca20a69e9dbe757bfba426eeaeab552
Author: Richard Biener <[email protected]>
Date:   Mon Jun 15 10:37:29 2026 +0200

    tree-optimization/125786 - do not rewrite stmts in reassoc

    We may not simply rewrite def stmts of associative operands as
    they might have multiple uses.  The following appropriately
    creates a new stmt instead.

            PR tree-optimization/125786
            * tree-ssa-reassoc.cc (optimize_vec_cond_expr): Create a new
            stmt instead of rewriting an existing possibly multi-use one.

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

    (cherry picked from commit b3763e32ea4b0bf9e68bb89eac9bf2d7ab92680c)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.