gcj overoptimizes "final" declarations
Andrew Pinski
pinskia@physics.uc.edu
Sun Sep 15 19:01:00 GMT 2002
With what version of gcj?
With `gcc version 3.3 20020915 (experimental)', it works just fine.
I think there was a bug in the inliner before so that is what looks
like is causing the problem.
Thanks,
Andrew Pinski
On Sunday, Sep 15, 2002, at 18:11 US/Pacific, Roland Illig wrote:
> $ cat Fib.java
> public class Fib
> {
> static private final int fib(int n)
> {
> if (n < 2)
> return n;
> return fib(n-1) + fib(n-2);
> }
>
> public static void main(String[] args)
> {
> System.out.println(fib(Integer.parseInt(args[0])));
> }
> }
> $ gcj -O2 -Wall -W --main=Fib -o Fib.gcc Fib.java
> $ gcj -O3 -Wall -W --main=Fib -o Fib.gcc Fib.java
> /tmp/ccaFOF35.o: In function `Fib::main(JArray<java::lang::String *>
> *)':
> /tmp/ccaFOF35.o(.text+0x5b): undefined reference to `Fib::fib(int)'
> collect2: ld returned 1 exit status
>
>
>
More information about the Gcc-bugs
mailing list