Bug 19908

Summary: Inlining of final fields incompatible with Sun's implementation
Product: gcc Reporter: dog <dog>
Component: javaAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: minor CC: gcc-bugs, java-prs
Priority: P2    
Version: 4.0.0   
Target Milestone: 4.3.0   
Host: powerpc-apple-darwin7.7.0 Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Bug Depends on: 28067    
Bug Blocks:    
Attachments: The Person class
The main class to reproduce the bug

Description dog@bluezoo.org 2005-02-11 16:40:36 UTC
The issue reported on the mailing list

  http://gcc.gnu.org/ml/java/2005-02/msg00031.html

shows that gcj will not inline a primitive final field that is i initialised
where it is declared, whereas Sun's implementation will (1.5).

The output of FinalFieldChange is

   Ng Keng Yap, 27 of IQ=150 from Malaysia

whereas Sun 1.5 outputs

   Ng Keng Yap, 27 of IQ=110 from Malaysia
Comment 1 dog@bluezoo.org 2005-02-11 16:41:38 UTC
Created attachment 8178 [details]
The Person class
Comment 2 dog@bluezoo.org 2005-02-11 16:42:20 UTC
Created attachment 8179 [details]
The main class to reproduce the bug
Comment 3 Andrew Pinski 2005-02-11 16:54:28 UTC
As dicussed there are still questions if this is wrong code or not.  Yes this 
is not the same as Sun's implementation but that means nothing really.
Comment 4 Tom Tromey 2007-01-09 20:47:17 UTC
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.