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
This commit is contained in:
Tom Tromey 2001-09-17 17:03:13 +00:00 committed by Tom Tromey
parent 17920efbf0
commit 7a91449ca1
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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>
* java-tree.h (TYPE_IMPORT_LIST): New macro.

View File

@ -1720,6 +1720,7 @@ generate_bytecode_insns (exp, target, state)
else
{
push_int_const (sw_state.cases->offset, state);
NOTE_PUSH (1);
emit_if (sw_state.cases->label,
OPCODE_if_icmpeq, OPCODE_if_icmpne, state);
}