[Bug tree-optimization/111442] [14 Regression] ICE on valid code at -O{s,2,3}: Segmentation fault signal terminated program cc1
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 18 20:46:02 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111442
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:7ea501d3ea698e1c845fb61e3487f4cd949e6253
commit r14-4114-g7ea501d3ea698e1c845fb61e3487f4cd949e6253
Author: Andrew Pinski <apinski@marvell.com>
Date: Sun Sep 17 11:20:36 2023 -0700
MATCH: Make zero_one_valued_p non-recursive fully
So it turns out VN can't handle any kind of recursion for match. In this
case we have `b = a & -1` and we try to match a as being zero_one_valued_p
and VN returns b as being the value and we just go into an infinite loop at
this point.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Note genmatch should warn (or error out) if this gets detected so I filed
PR 111446
which I will be looking into next week or the week after so we don't run
into
this issue again.
PR tree-optimization/111442
gcc/ChangeLog:
* match.pd (zero_one_valued_p): Have the bit_and match not be
recursive.
gcc/testsuite/ChangeLog:
* gcc.c-torture/compile/pr111442-1.c: New test.
More information about the Gcc-bugs
mailing list