https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122717
Bug ID: 122717
Summary: [16 Regression] Recent change causes xstormy16-elf to
hang during compilation
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: law at gcc dot gnu.org
Target Milestone: ---
This change:
commit b2e40fc16eb174ff8d97295367806dd93a0b189e
Author: Andrew Pinski <[email protected]>
Date: Sat Nov 15 14:51:32 2025 -0800
cfglceanup: Fix check for preheaders
I had messed up the check in r16-5258-g1d8e2d51e5c5cb for preheaders
where return to remvoe the forwarder preheader block even if
LOOPS_HAVE_PREHEADERS
was set. I am not sure how often this happens because most of the time the
pre-header
will have an incoming phi block anyways but it is safer not to remove it in
this case.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* tree-cfgcleanup.cc (tree_forwarder_block_p): Restore check on
LOOPS_HAVE_PREHEADERS.
Signed-off-by: Andrew Pinski <[email protected]>
Causes the xstormy16-elf compiler to go into an infinite loop compiling
gcc.dg/20020426-2.c with -O2. I haven't debugged beyond that.