I noticed this when looking at the regression, PR 15576. I don't know why it is disabled for compiling .class. It might because we were not function at a time before 4.0, I don't know.
-- Summary: Class initialization optimization is not done when compiled from .class Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia 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=18305