https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112400
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Maciej W. Rozycki <[email protected]>: https://gcc.gnu.org/g:8a9490979b97d6ce3498fde891b04597a48925ed commit r16-7515-g8a9490979b97d6ce3498fde891b04597a48925ed Author: Kalvis Duckmanton <[email protected]> Date: Sat Feb 14 15:10:15 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. 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.
