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

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 15 10:58:36 GMT 2026


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

--- Comment #5 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:b3763e32ea4b0bf9e68bb89eac9bf2d7ab92680c

commit r17-1562-gb3763e32ea4b0bf9e68bb89eac9bf2d7ab92680c
Author: Richard Biener <rguenther@suse.de>
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.


More information about the Gcc-bugs mailing list