PR 1208

Per Bothner per@bothner.com
Tue Mar 20 16:09:00 GMT 2001


Tom Tromey <tromey@redhat.com> writes:

> The "check for duplicates" hunk is from a different patch, the one for
> PR 383 (old numbering -- I don't know the new number).

I think this is the wrong place to check for duplicates - I think the
correct place is in java_complete_lhs.  Then you have the same code
and same error messages whether compiling to native or source.  At least
put in a FIXME about it.

> Meanwhile I'll await Per's review of the 1208 patch, which I've
> appended.  I don't seem to have a ChangeLog entry for it handy.

This patch seems to fix the problem.  Please try that instead.

Index: jcf-write.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-write.c,v
retrieving revision 1.72.2.1
diff -u -p -r1.72.2.1 jcf-write.c
--- jcf-write.c	2001/03/17 21:53:11	1.72.2.1
+++ jcf-write.c	2001/03/21 00:00:55
@@ -2395,7 +2395,6 @@ generate_bytecode_insns (exp, target, st
 	RESERVE (1);
 	OP1 (OPCODE_athrow);
 	NOTE_POP (1);
-	localvar_free (exception_decl, state);
 
 	/* The finally block.  First save return PC into return_link. */
 	define_jcf_label (finally_label, state);
@@ -2404,6 +2403,7 @@ generate_bytecode_insns (exp, target, st
 
 	generate_bytecode_insns (finally, IGNORE_TARGET, state);
 	maybe_wide (OPCODE_ret, DECL_LOCAL_INDEX (return_link), state);
+	localvar_free (exception_decl, state);
 	localvar_free (return_link, state);
 	define_jcf_label (finished_label, state);
       }

I'm going to try to figure out why the unreachable bytecodes are being
emitted next.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/



More information about the Java mailing list