mixing .java and .class, gcj4.3 regressions?
Marco Trudel
mtrudel@gmx.ch
Sat Jan 20 10:28:00 GMT 2007
Tom Tromey wrote:
>>>>>> "Marco" == Marco Trudel <mtrudel@gmx.ch> writes:
>> Marco> I'm ran my private tests with my fresh gcj 4.3.
>> Thanks for doing this.
>> Marco> gcj -s -O2 --main=HelloWorld HelloWorld.java World.class -o foobar.exe
> Marco> Works with gcj 4.2 but fails with gcj 4.3:
> Marco> C:\DOKUME~1\Marco\LOKALE~1\Temp/ccSkeaaa.o:ccoFcaaa.jar:(.text+0x66):
> Marco> undefined reference to `java::lang::String* World::getWorld()'
> Marco> collect2: ld returned 1 exit status
>> Just FYI, often 'gcj -v' gives useful information in cases like these.
>> In this case, -v shows that we are not compiling World.class to a .o.
> I am not sure why (I didn't investigate any deeper). The spec stuff
> here is pretty awful... :(
>> Marco> gcj -s -O2 --main=HelloWorld HelloWorld.java World.class -ofoobar.exe
> Marco> C:\DOKUME~1\Marco\LOKALE~1\Temp/ccgrbaaa.jar:0: internal compiler
> Marco> error: in java_parse_file, at java/jcf-parse.c:1945
>> This happens because we hit a gcc_unreachable in the place where we
> used to try to compile a .java file. Obviously this "shouldn't
> happen" -- somehow the driver is passing the .java file to the jc1
> invocation. Again, specs madness...
>> Marco> Well, the docs say that source and bytecode can't be mixed. So
> Marco> I don't know if the docs are out of date or it's just luck that
> Marco> it works with 4.2 and now it's still ok because it fails.
>> Ideally we would support all combinations. And, even if we don't, we
> need to give a nice error rather than mysterious linker errors or
> ICEs.
>> Please file these in bugzilla. Thanks.
Done. Here you go:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30515
thanks
Marco
More information about the Java
mailing list