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]

compiler segfault.


GCJ (today's cvs head) segfault when compiling the following code:



public class Speed
{
   public static final void main(String[] args) {
      try {
         int iterations = 1000000;
         int blocksize = (int)System.currentTimeMillis();
         long elapsed = -System.currentTimeMillis();

         float secs = (elapsed > 1) ? (float) elapsed  : 1;
         float speed = (float) iterations * blocksize;

         elapsed += System.currentTimeMillis();
         secs = (elapsed > 1) ? (float) elapsed : 1;

         speed = (float) blocksize * iterations;

         System.out.println(speed);

      } catch (Exception x) {
         x.printStackTrace(System.err);
      }
   }
}



tournesol$ gcj --classpath=/usr/local/gcc/share/libgcj.jar -O2 -c -o Speed.o Speed.java
Speed.java: In class `Speed':
Speed.java: In method `Speed.main(java.lang.String[])':
Speed.java:1: Internal compiler error in fixup_abnormal_edges, at reload1.c:9478Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.


Trying to simplify the code any futher fixes the problem!!!

It is on Debian Sid, x86 with gcj compiled as follow:

export CFLAGS="-O2 -funroll-loops"
export GCJFLAGS="-O2 -funroll-loops -fkeep-inline-functions"
~/gcc/configure --prefix=/usr/local/gcc --enable-shared --enable-haifa --enable-threads=posix --enable-languages=c++,java --enable-java-gc=boehm

Does anyone get the same behavior?

Olivier

-- 
----------------------------------------------------------------------
Olivier Louchart-Fletcher
Email: olivier@zipworld.com.au


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