This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
gcj/242: Compiler generates call to wrong method from inner class
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/242: Compiler generates call to wrong method from inner class
- From: bryce at albatross dot co dot nz
- Date: 25 May 2000 02:36:12 -0000
- Reply-To: bryce at albatross dot co dot nz
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, bryce@albatross.co.nz
>Number: 242
>Category: gcj
>Synopsis: Compiler generates call to wrong method from inner class
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 24 19:40:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Bryce McKinlay
>Release: unknown-1.0
>Organization:
>Environment:
gcc version 2.96 20000523 (experimental) w/ PR177 fix
>Description:
When an inner class tries to call a method that is defined
in a superclass of its enclosing class, the compiler calls
the wrong method. It seems to get the right offset, but
in the wrong vtable.
>How-To-Repeat:
Try running the test case (attached)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="PR242.java"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="PR242.java"
Y2xhc3MgQmFzZQp7CiAgaW50IHNvbWVOdW0oKQogIHsKICAgIFN5c3RlbS5vdXQucHJpbnRsbiAo
Im9rIik7CiAgICByZXR1cm4gMDsKICB9Cn0KCnB1YmxpYyBjbGFzcyBQUjI0MiBleHRlbmRzIEJh
c2UKewogIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZyBhcmdzW10pCiAgewogICAgbmV3
IFBSMjQyKCk7CiAgfQogIAogIFBSMjQyKCkKICB7CiAgICBuZXcgSW5uZXIoKS5hKCk7CiAgfQog
ICAgIAogIGNsYXNzIElubmVyCiAgewogICAgcHVibGljIGludCBkdW1teSgpCiAgICB7CiAgICAg
IFN5c3RlbS5vdXQucHJpbnRsbiAoIndyb25nIG1ldGhvZCBjYWxsZWQhISIpOwogICAgICByZXR1
cm4gLTE7CiAgICB9CiAgCiAgICBwdWJsaWMgdm9pZCBhKCkKICAgIHsKICAgICAgU3lzdGVtLm91
dC5wcmludGxuICgiLi4uIik7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoc29tZU51bSgpKTsg
ICAgCiAgICB9CiAgfQogIAp9Cg==