Bug 27925 - Trampolines not generated for private inner class methods.
Summary: Trampolines not generated for private inner class methods.
Status: RESOLVED DUPLICATE of bug 19870
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-07 00:41 UTC by Casey Marshall
Modified: 2006-12-18 18:31 UTC (History)
11 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Test case. (150 bytes, text/plain)
2006-06-07 00:42 UTC, Casey Marshall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Casey Marshall 2006-06-07 00:41:56 UTC
The attached test case compiles to bytecode wrong. It should generate a package-private accessor function in the inner class that calls the private method, which the containing class calls. Instead, the containing class calls the private method directly, and no trampoline is created in the inner class.

This violates access rules, and thus the test case will not run.

Steps to reproduce:
gcj -C xxx.java
gij xxx

Expected results:
A line "This is foo!" is printed.

Actual results:
An exception is thrown:
Exception in thread "main" java.lang.IllegalAccessError: xxx: xxx$blargh.foo()V
   at xxx.main(xxx.java:5)

$ gcj --version
gcj (GCC) 4.2.0 20060606 (experimental)
Comment 1 Casey Marshall 2006-06-07 00:42:30 UTC
Created attachment 11618 [details]
Test case.

Test case.
Comment 2 Bryce McKinlay 2006-06-07 18:06:54 UTC

*** This bug has been marked as a duplicate of 19870 ***