This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: PR 4766 test case


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)
+  {
+  }
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]