Commit 7a91449c by Tom Tromey Committed by Tom Tromey

re PR java/4189 (gcj generates bytecode for switch stmt that doesn't verify)

	* jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
	NOTE_PUSH for single-case push.  Fixes PR java/4189.

From-SVN: r45655
parent 17920efb
2001-09-16 Tom Tromey <tromey@redhat.com>
* jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
NOTE_PUSH for single-case push. Fixes PR java/4189.
2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com> 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
* java-tree.h (TYPE_IMPORT_LIST): New macro. * java-tree.h (TYPE_IMPORT_LIST): New macro.
......
...@@ -1720,6 +1720,7 @@ generate_bytecode_insns (exp, target, state) ...@@ -1720,6 +1720,7 @@ generate_bytecode_insns (exp, target, state)
else else
{ {
push_int_const (sw_state.cases->offset, state); push_int_const (sw_state.cases->offset, state);
NOTE_PUSH (1);
emit_if (sw_state.cases->label, emit_if (sw_state.cases->label,
OPCODE_if_icmpeq, OPCODE_if_icmpne, state); OPCODE_if_icmpeq, OPCODE_if_icmpne, state);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment