This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mixing .java and .class, gcj4.3 regressions?


Hey all

I'm ran my private tests with my fresh gcj 4.3. The only two problems I see are:

gcj -s -O2 --main=HelloWorld HelloWorld.java World.class -o foobar.exe

Works with gcj 4.2 but fails with gcj 4.3:
C:\DOKUME~1\Marco\LOKALE~1\Temp/ccSkeaaa.o:ccoFcaaa.jar:(.text+0x66):
undefined reference to `java::lang::String* World::getWorld()'
collect2: ld returned 1 exit status

Or worse:

gcj -s -O2 --main=HelloWorld HelloWorld.java World.class -ofoobar.exe

(No space between "-o" and "foobar.exe"). That works with gcj 4.2 and the no space thing with gcj 4.3 usually too. But in this case, when compilation would fail anyway, it gives an internal compiler error:
C:\DOKUME~1\Marco\LOKALE~1\Temp/ccgrbaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1945
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.



Well, the docs say that source and bytecode can't be mixed. So I don't know if the docs are out of date or it's just luck that it works with 4.2 and now it's still ok because it fails. The second problem depends on the first one...



Marco
public class HelloWorld
{
	public static void main(String[] args)
	{
		System.out.println("Hello" + World.getWorld());
	}
}
public class World
{
	public static String getWorld() { return "World"; }
}

Attachment: World.class
Description: Binary data


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