This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal Compiler Error in GCJ Compiling LIBGCJ
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Internal Compiler Error in GCJ Compiling LIBGCJ
- From: Glenn Chambers <gchamber at bright dot net>
- Date: Sat, 29 Jan 2000 20:23:01 -0500
- Cc: java-discuss at sourceware dot cygnus dot com
While compiling a fairly recent (Thursday evening) CVS checkout of
LIBGCJ, I got an internal compiler error.
/home/glenn/gcc/libgcj/libjava/java/lang/Math.java: In class
`java.lang.Math':
/home/glenn/gcc/libgcj/libjava/java/lang/Math.java: In
method `random()':
/home/glenn/gcc/libgcj/libjava/java/lang/Math.java:69:
Internal compiler error in `convert_regs_1', at reg-stack.c:2594
Please
submit a full bug report.
See
<URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
This is on a RedHat 6.0 release, on a 486 processor, compiling with the
current CVS (also as of Thursday night).
Attached is a GDB session with a stack trace, the (partial) .s output file,
a copy of the input source, and configuration information.
Any help would be appreciated.
Script started on Sat Jan 29 13:22:22 2000
[glenn@glennhome x]$ cat /tmp/jfail2
CLASSPATH=/home/glenn/gcc/bld-libgcj/i486-pc-linux-gnu/libjava \
gdb /usr/local/lib/gcc-lib/i486-pc-linux-gnu/2.96/jc1 <<EOF
b fancy_abort
run \
/home/glenn/gcc/libgcj/libjava/java/lang/Math.java \
-fuse-divide-subroutine -fsjlj-exceptions -quiet -g -version \
-fassume-compiled -fPIC -o Math.s
bt
c
EOF
[glenn@glennhome x]$ sh /tmp/jfail2
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) b fancy_abort
Breakpoint 1 at 0x80e29da: file /home/glenn/gcc/egcs/gcc/rtl.c, line 1249.
(gdb) run
Starting program: /usr/local/lib/gcc-lib/i486-pc-linux-gnu/2.96/jc1 /home/glenn/gcc/libgcj/libjava/java/lang/Math.java -fuse-divide-subroutine -fsjlj-exceptions -quiet -g -version -fassume-compiled -fPIC -o Math.s
GNU Java version 2.96 20000127 (experimental) (i486-pc-linux-gnu) compiled by GNU C version 2.96 20000127 (experimental).
Breakpoint 1, fancy_abort (
file=0x8257ba0 "/home/glenn/gcc/egcs/gcc/reg-stack.c", line=2594,
function=0x8257f14 "convert_regs_1") at /home/glenn/gcc/egcs/gcc/rtl.c:1249
1249 if (function == NULL)
(gdb) bt
#0 fancy_abort (file=0x8257ba0 "/home/glenn/gcc/egcs/gcc/reg-stack.c",
line=2594, function=0x8257f14 "convert_regs_1")
at /home/glenn/gcc/egcs/gcc/rtl.c:1249
#1 0x819d09c in convert_regs_1 (file=0x0, block=0x82a3d28)
at /home/glenn/gcc/egcs/gcc/reg-stack.c:2594
#2 0x819d182 in convert_regs_2 (file=0x0, block=0x82a3ab8)
at /home/glenn/gcc/egcs/gcc/reg-stack.c:2642
#3 0x819d210 in convert_regs (file=0x0)
at /home/glenn/gcc/egcs/gcc/reg-stack.c:2680
#4 0x8199ea6 in reg_to_stack (first=0x82c4df4, file=0x0)
at /home/glenn/gcc/egcs/gcc/reg-stack.c:479
#5 0x8082b00 in rest_of_compilation (decl=0x82ba960)
at /home/glenn/gcc/egcs/gcc/toplev.c:3561
#6 0x8056172 in source_end_java_method () at ./parse.y:5881
#7 0x80567c0 in java_complete_expand_method (mdecl=0x82ba960)
at ./parse.y:6196
#8 0x8056552 in java_complete_expand_methods () at ./parse.y:6081
#9 0x8056a64 in java_expand_classes () at ./parse.y:6340
#10 0x8075ca4 in yyparse () at /home/glenn/gcc/egcs/gcc/java/jcf-parse.c:874
#11 0x8080e66 in compile_file (
name=0xbffffdb0 "/home/glenn/gcc/libgcj/libjava/java/lang/Math.java")
at /home/glenn/gcc/egcs/gcc/toplev.c:2375
#12 0x80848e9 in main (argc=11, argv=0xbffffc74)
at /home/glenn/gcc/egcs/gcc/toplev.c:4765
#13 0x4002fcb3 in __libc_start_main (main=0x80841f0 <main>, argc=11,
argv=0xbffffc74, init=0x8049070 <_init>, fini=0x822407c <_fini>,
rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffc6c)
at ../sysdeps/generic/libc-start.c:78
(gdb) Continuing.
/home/glenn/gcc/libgcj/libjava/java/lang/Math.java: In class `java.lang.Math':
/home/glenn/gcc/libgcj/libjava/java/lang/Math.java: In method `random()':
/home/glenn/gcc/libgcj/libjava/java/lang/Math.java:69: Internal compiler error in `convert_regs_1', at reg-stack.c:2594
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
Program exited with code 041.
(gdb) quit
[glenn@glennhome x]$ ls -l
total 3
-rw-rw-r-- 1 glenn glenn 2362 Jan 29 13:22 Math.s
-rw-rw-r-- 1 glenn glenn 0 Jan 29 13:22 gcj-fail
[glenn@glennhome x]$ cat Math.s
.file "Math.java"
.version "01.01"
.stabs "/home/glenn/x/",100,0,0,.Ltext0
.stabs "/home/glenn/gcc/libgcj/libjava/java/lang/Math.java",100,0,0,.Ltext0
.text
.Ltext0:
.stabs "gcc2_compiled.", 0x3c, 0, 0, 0
.stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0
.stabs "char:t(0,2)=@s16;-20;",128,0,0,0
.stabs "byte:t(0,3)=@s8;r(0,3);-128;127;",128,0,0,0
.stabs "short:t(0,4)=@s16;r(0,4);-32768;32767;",128,0,0,0
.stabs "long:t(0,5)=@s64;r(0,5);01000000000000000000000;0777777777777777777777;",128,0,0,0
.stabs "unsigned byte:t(0,6)=@s8;r(0,6);0;255;",128,0,0,0
.stabs "unsigned short:t(0,7)=@s16;r(0,7);0;65535;",128,0,0,0
.stabs "unsigned int:t(0,8)=r(0,8);0000000000000;0037777777777;",128,0,0,0
.stabs "unsigned long:t(0,9)=@s64;r(0,9);0000000000000;01777777777777777777777;",128,0,0,0
.stabs "void:t(0,10)=(0,10)",128,0,0,0
.stabs "boolean:t(0,11)=@s8;-16;",128,0,0,0
.stabs "promoted_byte:t(0,12)=r(0,12);-2147483648;2147483647;",128,0,0,0
.stabs "promoted_short:t(0,13)=r(0,13);-2147483648;2147483647;",128,0,0,0
.stabs "promoted_char:t(0,14)=@s32;-20;",128,0,0,0
.stabs "promoted_boolean:t(0,15)=@s32;-16;",128,0,0,0
.stabs "float:t(0,16)=r(0,1);4;0;",128,0,0,0
.stabs "double:t(0,17)=r(0,1);8;0;",128,0,0,0
.stabs "java.lang.Object:T(0,18)=s8vtable:/0(0,19)=*(0,20)=s12class:(0,21)=*(0,22)=xsjava.lang.Class:,0,32;methods:(0,23)=ar(0,1);0;1;(0,24)=*(0,10),32,64;;,0,32;sync_info:/0(0,24),32,32;;",128,0,0,0
.stabs "java.lang.Object:Tt(0,18)",128,0,0,0
.stabs "java.lang.Class:Tt(0,22)=s76!1,020,(0,18);next:/0(0,21),64,32;name:/0(0,25)=*(0,26)=s4hash:(0,7),0,16;length:(0,7),16,16;;,96,32;accflags:/0(0,7),128,16;superclass:/0(0,21),160,32;constants:/0(0,27)=s12size:(0,8),0,32;tags:(0,24),32,32;data:(0,24),64,32;;,192,96;methods:/0(0,28)=*(0,29)=s16name:(0,25),0,32;signature:(0,25),32,32;accflags:(0,7),64,16;ncode:(0,24),96,32;;,288,32;method_count:/0(0,4),320,16;vtable_method_count:/0(0,4),336,16;fields:/0(0,30)=*(0,31)=s16name:(0,25),0,32;type:(0,21),32,32;accflags:(0,7),64,16;bsize:(0,7),80,16;info:(0,32)=u4boffset:(0,1),0,32;addr:(0,24),0,32;;,96,32;;,352,32;size_in_bytes:/0(0,1),384,32;field_count:/0(0,4),416,16;static_field_count:/0(0,4),432,16;vtable:/0(0,19),448,32;interfaces:/0(0,33)=*(0,21),480,32;loader:/0(0,24),512,32;interface_count:/0(0,4),544,16;state:/0(0,3),560,8;thread:/0(0,24),576,32;;",128,0,0,0
.globl __sjthrow
[glenn@glennhome x]$ cat /home/glenn/gcc/libgcj/libjava/java/lang/Math.java
/* Copyright (C) 1998, 1999 Red Hat, Inc.
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
/**
* @author Andrew Haley <aph@cygnus.com>
* @date September 18, 1998.
*/
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
package java.lang;
import java.util.Random;
public final class Math
{
private static Random random_;
public static final double E = 2.7182818284590452354;
public static final double PI = 3.14159265358979323846;
public static native double sin (double x);
public static native double cos (double x);
public static native double tan (double x);
public static native double asin (double x);
public static native double acos (double x);
public static native double atan (double x);
public static native double atan2(double y, double x);
public static native double exp (double x);
public static native double log (double x);
public static native double sqrt (double x);
public static native double pow (double x, double y);
public static native double IEEEremainder (double x, double y);
public static native double ceil (double x);
public static native double floor (double x);
public static native double rint (double x);
public static native int round (float x);
public static native long round (double x);
public static synchronized double random ()
{
if (random_ == null)
random_ = new Random ();
return random_.nextDouble ();
}
public static int abs (int n)
{
return (n < 0 ? -n : n);
}
public static long abs (long n)
{
return (n < 0 ? -n : n);
}
public static native float abs (float x);
public static native double abs (double x);
public static int min (int a, int b)
{
return (a < b ? a : b);
}
public static long min (long a, long b)
{
return (a < b ? a : b);
}
public static native float min (float a, float b);
public static native double min (double a, double b);
public static int max (int a, int b)
{
return (a < b ? b : a);
}
public static long max (long a, long b)
{
return (a < b ? b : a);
}
public static native float max (float a, float b);
public static native double max (double a, double b);
// Don't allow objects to be made.
private Math ()
{
}
}
[glenn@glennhome x]$ exit
Script done on Sat Jan 29 13:23:57 2000
GCC configured with:
/home/glenn/gcc/egcs/configure --enable-threads=posix --enable-shared
LIBGCJ configured with:
/home/glenn/gcc/libgcj/configure --enable-java-gc=boehm \
--enable-threads=posix --enable-interpreter
-- Glenn Chambers
-- Toledo, Ohio
-- gchamber@bright.net