This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

java/1880: Link failure compiling bytecode from javac



>Number:         1880
>Category:       java
>Synopsis:       Link failure compiling bytecode from javac
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 05 14:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     jeff.sturm@commerceone.com
>Release:        2.97 20010205 (experimental)
>Organization:
>Environment:

>Description:
Sun's javac compiler creates fields to store .class lookups
at runtime.  Gcj apparently has trouble compiling these,
although it can compile its own bytecode fine.

This appears to be a recent regression, since the code in
question worked fine with a January snapshot.
>How-To-Repeat:
Compile any class with a ".class" operator:

[jsturm@toronto jsturm]$ cat >DotClass.java
public class DotClass {
        public static void main(String[] args) {
                System.out.println(String.class);
        }
}
[jsturm@toronto jsturm]$ javac DotClass.java
[jsturm@toronto jsturm]$ gcj --main=DotClass DotClass.class -o dotclass
/tmp/ccwIQHcj.o: In function `DotClass::main(JArray<java::lang::String*>*)    ':
/home/jsturm/DotClass.class(.text+0x5f): undefined reference to `DotClass::class$java$lang$String     '
/home/jsturm/DotClass.class(.text+0x8b): undefined reference to `DotClass::class$java$lang$String     '
/home/jsturm/DotClass.class(.text+0x92): undefined reference to `DotClass::class$java$lang$String     '
collect2: ld returned 1 exit status
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]