aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libjava/testsuite/ChangeLog6
-rw-r--r--libjava/testsuite/libjava.lang/PR162.java29
-rw-r--r--libjava/testsuite/libjava.lang/PR162.out4
3 files changed, 39 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index 7115d61..a3082b8 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2000-03-07 Tom Tromey <tromey@cygnus.com>
+
+ Test for PR gcj/162:
+ * libjava.lang/PR162.out: New file.
+ * libjava.lang/PR162.java: New file.
+
2000-03-06 Tom Tromey <tromey@cygnus.com>
Test for PR gcj/164:
diff --git a/libjava/testsuite/libjava.lang/PR162.java b/libjava/testsuite/libjava.lang/PR162.java
new file mode 100644
index 0000000..a9f802c
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/PR162.java
@@ -0,0 +1,29 @@
+interface I
+{
+ int i = 1, ii = Test.out ("ii", 2);
+}
+
+interface J extends I
+{
+ int j = Test.out ("j", 3), jj = Test.out ("jj", 4);
+}
+
+interface K extends J
+{
+ int k = Test.out ("k", 5);
+}
+
+public class PR162
+{
+ public static void main (String[] args)
+ {
+ System.out.println (J.i);
+ System.out.println (K.j);
+ }
+
+ public static int out (String s, int i)
+ {
+ System.out.println (s + "=" + i);
+ return i;
+ }
+}
diff --git a/libjava/testsuite/libjava.lang/PR162.out b/libjava/testsuite/libjava.lang/PR162.out
new file mode 100644
index 0000000..6510a2d
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/PR162.out
@@ -0,0 +1,4 @@
+1
+j=3
+jj=4
+3