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.