Ptx is one of those rare (unique?) machines that doesn't have an indirect
branch. optabs is prepared for such a target and emits a sorry when an
indirect branch is needed. However it then goes on to try and emit such an
instruction and ends up ICEing.
Fixed thusly, ok? (Or is the right solution to define a dummy indirect branch
in the PTX md file?)
nathan
2015-08-25 Nathan Sidwell <nat...@acm.org>
* optabs (emit_indirect_jump): Don't try an emit a jump if the
target doesn't have one.
Index: gcc/optabs.c
===================================================================
--- gcc/optabs.c (revision 227128)
+++ gcc/optabs.c (working copy)
@@ -4488,11 +4488,13 @@ emit_indirect_jump (rtx loc)
{
if (!targetm.have_indirect_jump ())
sorry ("indirect jumps are not available on this target");
-
- struct expand_operand ops[1];
- create_address_operand (&ops[0], loc);
- expand_jump_insn (targetm.code_for_indirect_jump, 1, ops);
- emit_barrier ();
+ else
+ {
+ struct expand_operand ops[1];
+ create_address_operand (&ops[0], loc);
+ expand_jump_insn (targetm.code_for_indirect_jump, 1, ops);
+ emit_barrier ();
+ }
}