From cb3d02c0ed928b1c1a98a7df49274835eb4e6133 Mon Sep 17 00:00:00 2001
From: apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 13 Jul 2001 19:45:05 +0000
Subject: [PATCH] 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* libjava.compile/anon_ctor_itf_arg.java: Moved to `libjava.lang.'
	* libjava.compile/anon_ctor_itf_arg.out: Likewise
	* libjava.lang/invoke_from_inner.java: New file.
	* libjava.lang/invoke_from_inner.out: Likewise.

(http://gcc.gnu.org/ml/java-patches/2001-q3/msg00061.html )


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43994 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libjava/testsuite/ChangeLog                   |  7 ++++
 .../anon_ctor_itf_arg.java                    |  0
 .../anon_ctor_itf_arg.out                     |  0
 .../libjava.lang/invoke_from_inner.java       | 37 +++++++++++++++++++
 .../libjava.lang/invoke_from_inner.out        |  2 +
 5 files changed, 46 insertions(+)
 rename libjava/testsuite/{libjava.compile => libjava.lang}/anon_ctor_itf_arg.java (100%)
 rename libjava/testsuite/{libjava.compile => libjava.lang}/anon_ctor_itf_arg.out (100%)
 create mode 100644 libjava/testsuite/libjava.lang/invoke_from_inner.java
 create mode 100644 libjava/testsuite/libjava.lang/invoke_from_inner.out

diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index 3ca3d52a132f..8c9acc42b1b5 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+	* libjava.compile/anon_ctor_itf_arg.java: Moved to `libjava.lang.'
+	* libjava.compile/anon_ctor_itf_arg.out: Likewise
+	* libjava.lang/invoke_from_inner.java: New file.
+	* libjava.lang/invoke_from_inner.out: Likewise.
+
 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
 
 	* libjava.compile/anon_ctor_itf_arg.java: New file.
diff --git a/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.java b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java
similarity index 100%
rename from libjava/testsuite/libjava.compile/anon_ctor_itf_arg.java
rename to libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java
diff --git a/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.out b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out
similarity index 100%
rename from libjava/testsuite/libjava.compile/anon_ctor_itf_arg.out
rename to libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out
diff --git a/libjava/testsuite/libjava.lang/invoke_from_inner.java b/libjava/testsuite/libjava.lang/invoke_from_inner.java
new file mode 100644
index 000000000000..8659ac6d5592
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/invoke_from_inner.java
@@ -0,0 +1,37 @@
+// This test case once showed that `f[0].execute(x)' woudln't be
+// expanded properly, attempting to retrieve this$0 to be used in
+// place of `f[0]'.
+
+abstract class A {
+    abstract public void execute(C x);
+}
+
+class C {}
+
+class Z extends A {
+    public void execute (C x) {
+	System.out.println ("Z.execute");
+    }
+}
+
+public class invoke_from_inner extends A {
+
+    Z f[] = new Z[1];
+    class D extends C {
+	D (C x) {
+	    f[0].execute (x);
+	    execute (x);
+	}
+    }
+    public void execute (C x) {
+      System.out.println ("invoke_from_inner.execute");
+    }
+
+    public static void main (String a[]) {
+	new invoke_from_inner().foo();
+    }
+    void foo () {
+	f[0] = new Z();
+	new D(new C());
+    }
+}
diff --git a/libjava/testsuite/libjava.lang/invoke_from_inner.out b/libjava/testsuite/libjava.lang/invoke_from_inner.out
new file mode 100644
index 000000000000..1911e2f0dad1
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/invoke_from_inner.out
@@ -0,0 +1,2 @@
+Z.execute
+invoke_from_inner.execute
-- 
GitLab