Bug 20088 - -findirect-dispatch: error: final field 'text' may not have been initialized
Summary: -findirect-dispatch: error: final field 'text' may not have been initialized
Status: RESOLVED DUPLICATE of bug 21624
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, rejects-valid
Depends on:
Blocks:
 
Reported: 2005-02-19 19:36 UTC by Timo Lindfors
Modified: 2005-05-17 14:53 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-02-19 19:40:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Lindfors 2005-02-19 19:36:16 UTC
Compiling

public class FinalTest2 {
        public static final String text = "foo";
        public static void main(String[] args) {
                System.out.println(text);
        }

}

fails if I use -findirect-dispatch:

$ gcj -findirect-dispatch FinalTest2.java --main=FinalTest2 -o FinalTest2
FinalTest2.java: In class 'FinalTest2':
FinalTest2.java: In method '<clinit>()':
FinalTest2.java:2: error: final field 'text' may not have been initialized
FinalTest2.java: At top level:
FinalTest2.java:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Andrew Pinski 2005-02-19 19:39:59 UTC
Confirmed but note right now that -findirect-dispatch is really only for compiling from bytecode.
Comment 2 Andrew Haley 2005-05-17 14:49:01 UTC

*** This bug has been marked as a duplicate of 21264 ***
Comment 3 Andrew Haley 2005-05-17 14:53:03 UTC
.
Comment 4 Andrew Haley 2005-05-17 14:53:30 UTC

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