For PR java/4766:
authorTom Tromey <tromey@redhat.com>
Thu, 20 Dec 2001 18:05:20 +0000 (18:05 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 20 Dec 2001 18:05:20 +0000 (18:05 +0000)
* libjava.compile/PR4766.java: New file.

From-SVN: r48209

libjava/testsuite/ChangeLog
libjava/testsuite/libjava.compile/PR4766.java [new file with mode: 0644]

index 6baae49..4cdcab2 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-20  Tom Tromey  <tromey@redhat.com>
+
+       For PR java/4766:
+       * libjava.compile/PR4766.java: New file.
+
 2001-12-20  Andrew Haley  <aph@redhat.com>
 
        * libjava.lang/FileHandleGcTest.out:  New file.
diff --git a/libjava/testsuite/libjava.compile/PR4766.java b/libjava/testsuite/libjava.compile/PR4766.java
new file mode 100644 (file)
index 0000000..840f669
--- /dev/null
@@ -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)
+  {
+  }
+}