[Bug target/112400] [12/13/14/15 Regression] VAX: ICE in fixup_reorder_chain, at cfgrtl.cc:4025, whilst building gimple_match.cc
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 9 01:42:30 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112400
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Maciej W. Rozycki
<macro@gcc.gnu.org>:
https://gcc.gnu.org/g:ad82d77973549268ae77cfcf6dc4edef2d3b53bc
commit r15-10921-gad82d77973549268ae77cfcf6dc4edef2d3b53bc
Author: Kalvis Duckmanton <kalvisd@gmail.com>
Date: Mon Mar 9 01:36:04 2026 +0000
VAX: Fix ICE in fixup_reorder_chain when building gimple_match.cc
[PR112400]
When cross-compiling itself for VAX, GCC terminates abruptly with an ICE
when compiling gimple_match.cc; the root cause seems to be an
incompletely removed computed jump instruction, which causes the
assertion in cfgrtl.cc around line 4083, to no longer hold.
I have verified that the problem is present in GCC 15.2.0 and believe
that it's also present in trunk (based on the fact that the patterns for
the "casesi1" and "*casesi1" instructions in 15.2.0 and trunk are the
same).
To fix this issue wrap the limit operand in a USE, to allow `single_set'
to identify it as an RTL expression setting PC. This allows the
optimizer to optimize away case statements branching only to a basic
block, removing the ICE.
Include a test case reduced from gimple_match.cc, which demonstrates the
problem in GCC 15.2.0 on NetBSD/amd64 cross-compiling for VAX.
Signed-off-by: Kalvis Duckmanton <kalvisd@gmail.com>
gcc/
PR target/112400
* config/vax/vax.md (casesi1): Wrap naked operand 1 with a USE
where used with the insn split to.
(*casesi1): Likewise naked incoming operand 1.
gcc/testsuite/
PR target/112400
* g++.dg/torture/pr112400.C: New file.
(cherry picked from commit 8a9490979b97d6ce3498fde891b04597a48925ed)
More information about the Gcc-bugs
mailing list