Various jvm opcodes such as "invokespecial" and "getfield" have runtime restrictions on access to protected members. For instance, when using getfield, the object reference must be the current class or a subclass of it. These access checks are not currently performed. They should be. In some cases it may be possible to determine this statically, or to treat it as equivalent to a runtime type assertion. I'm not sure this can be done in all cases; some testing is required. (The question is really whether the verifier catches this during its modeling, or whether the check is performed during execution.)
-- Summary: runtime 'protected' access checks Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tromey at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20047