https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112400
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Maciej W. Rozycki <[email protected]>: https://gcc.gnu.org/g:579c2a643a93a2835a142840e75d54e4c9783f43 commit r14-12351-g579c2a643a93a2835a142840e75d54e4c9783f43 Author: Kalvis Duckmanton <[email protected]> Date: Mon Mar 9 01:36:23 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 <[email protected]> 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)
