gcj bug

Alexandre Petit-Bianco apbianco@cygnus.com
Thu Aug 23 16:29:00 GMT 2001


Tom Tromey writes:

> Compile the appended program with `gcj -C'.
> Notice how it fails.
> Then compile with javac and see it succeed.

The exception is being generated by a synthetic function:
class$(java.lang.String)java.lang.Class.

Both class$ in both bytecode outputs are identical and they're invoked
the same way except that javac maintains caches of the retrieved
values.

We don't do that (for several reasons: generating optimized bytecode
isn't really our priority, it wasn't an worth spending the time to
implement it at the time, etc... Note that this could be fixed if
there's a good reason for it.) As a result, in the gcj generated
bytecode, class$ is called twice with different arguments and failed
the second time. Could it be a VM problem?

./A



More information about the Java mailing list