Bryce McKinlay bryce@albatross.co.nz
Wed Oct 18 04:16:00 GMT 2000

The following reply was made to PR gcj/340; it has been noted by GNATS.

From: Bryce McKinlay <bryce@albatross.co.nz>
To: apbianco@cygnus.com
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/340
Date: Thu, 19 Oct 2000 00:03:12 +1300

 OK, here's a weird one.
 Although this patch does seem to have mostly fixed the problem, the original
 program I noticed this bug on ("jBYTEmark" -
 http://waitaki.otago.ac.nz/~bryce/gcj/jbytemark-0.9+.tar.gz ), now fails to
 compile at any -O level.
 $ gcj *.java
 /usr/lib/crt1.o: In function `_start':
 /usr/lib/crt1.o(.text+0x18): undefined reference to `main'
 /tmp/ccHH7YSO.o: In function `__finit3Foo':
 /home/bryce/downloads/jbyte/t2/Foo.java(.text+0x45): undefined reference to
 /home/bryce/downloads/jbyte/t2/Foo.java(.text+0x79): undefined reference to
 collect2: ld returned 1 exit status
 This test is the closest I could come to extracting a test case - the
 two-dimensional array seems to be the cause, but the problem doesn't appear
 unless a reference to "Final" is present somewhere also. Additionally, if the
 arrays in "odd" are made smaller, the problem doesnt appear either.
 These classes must also be in separate .java files.
 final class Final
 { static int i;}
 class Foo
   int [][] odd =
   public static void main(String[] args)
     int j = Final.i;
   [ bryce ]
 apbianco@cygnus.com wrote:
 >  Synopsis: Static array initializer link failure with -O
 >  State-Changed-From-To: feedback->closed
 >  State-Changed-By: apbianco
 >  State-Changed-When: Fri Oct 13 14:12:58 2000
 >  State-Changed-Why:
 >      I checked in a patch:
 >        http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00374.html
 >      (sans the ChangeLog entry typo.)
 >  http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=340&database=java

More information about the Java-prs mailing list