aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@albatross.co.nz>2000-05-29 05:26:14 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2000-05-29 06:26:14 +0100
commitf192590a796296a3fd4659ad92e83099b8557b16 (patch)
tree5acce0067b5177f7c3f2d738cc2534e414960d76 /libjava/testsuite
parent37c67319e14b70957932cd33cb5b0a318213e01a (diff)
downloadgcc-f192590a796296a3fd4659ad92e83099b8557b16.zip
gcc-f192590a796296a3fd4659ad92e83099b8557b16.tar.gz
gcc-f192590a796296a3fd4659ad92e83099b8557b16.tar.bz2
re GNATS gcj/242 (Compiler generates call to wrong method from inner class)
2000-05-29 Bryce McKinlay <bryce@albatross.co.nz> * libjava.lang/PR242.java: New file. PR gcj/242. From-SVN: r34245
Diffstat (limited to 'libjava/testsuite')
-rw-r--r--libjava/testsuite/ChangeLog4
-rw-r--r--libjava/testsuite/libjava.lang/PR242.java36
-rw-r--r--libjava/testsuite/libjava.lang/PR242.out3
3 files changed, 43 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index 1ef6832..c8b383a 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-29 Bryce McKinlay <bryce@albatross.co.nz>
+
+ * libjava.lang/PR242.java: New file. PR gcj/242.
+
2000-05-23 Tom Tromey <tromey@cygnus.com>
* libjava.compile/PR238.java: New file. For PR gcj/238.
diff --git a/libjava/testsuite/libjava.lang/PR242.java b/libjava/testsuite/libjava.lang/PR242.java
new file mode 100644
index 0000000..6f74b46
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/PR242.java
@@ -0,0 +1,36 @@
+class Base
+{
+ int someNum()
+ {
+ System.out.println ("ok");
+ return 0;
+ }
+}
+
+public class PR242 extends Base
+{
+ public static void main(String args[])
+ {
+ new PR242();
+ }
+
+ PR242()
+ {
+ new Inner().a();
+ }
+
+ class Inner
+ {
+ public int dummy()
+ {
+ System.out.println ("wrong method called!!");
+ return -1;
+ }
+
+ public void a()
+ {
+ System.out.println ("...");
+ System.out.println (someNum());
+ }
+ }
+}
diff --git a/libjava/testsuite/libjava.lang/PR242.out b/libjava/testsuite/libjava.lang/PR242.out
new file mode 100644
index 0000000..98b7db3
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/PR242.out
@@ -0,0 +1,3 @@
+...
+ok
+0