This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: PR 4766 test case
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 20 Dec 2001 11:11:26 -0700
- Subject: Patch: FYI: PR 4766 test case
- Reply-to: tromey at redhat dot com
I'm checking this in.
This is a test case for PR 4766.
I have a patch that fixes the bug that I'll be submitting shortly.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
For PR java/4766:
* libjava.compile/PR4766.java: New file.
Index: libjava.compile/PR4766.java
===================================================================
RCS file: PR4766.java
diff -N PR4766.java
--- /dev/null Tue May 5 13:32:27 1998
+++ libjava.compile/PR4766.java Thu Dec 20 10:01:36 2001
@@ -0,0 +1,25 @@
+// Test that bytecode generation works even when `finally' clause
+// doesn't return normally.
+
+public class PR4766
+{
+ public static int myfunction()
+ {
+ try
+ {
+ System.out.println ("hi");
+ }
+ catch( Exception e )
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ return 0;
+ }
+ }
+
+ public static void main (String[] args)
+ {
+ }
+}