This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
[ Reported to the Debian BTS as report #152501. Please CC 152501@bugs.debian.org on replies. Log of report can be found at http://bugs.debian.org/152501 ] Rechecked with gcc-3_1-branch 20020606. Hello, I found code on which gcj crashes. I reduced it to a minimal test case, and in the process found a workaround, so I'm happy :) But here's the test case: File Main.java: import pkg.sub; class Main { public static void progressMessage(String msg) { System.out.println(msg); } public static void main(String[] args) { new sub(); } } File pkg/sub.java: package pkg; public class sub { public sub() { Main.progressMessage("Foo"); } } Compilation: % gcj-3.1 -I. -c Main.java -o Main.o % gcj-3.1 -I. -c pkg/sub.java -o pkg/sub.o pkg/sub.java:5: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. I think the problem is also present upstream, because I got the same crash with a non-debian version of gcj 3.1. Changing "class Main" to "public class Main" will make the crash go away. Richard Braakman Release: 3.1 (Debian) (Debian unstable) Environment: System: Debian GNU/Linux (unstable) Architecture: i686 host: i386-linux configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=$\(prefix\)/share/man --infodir=$\(prefix\)/share/info --with-gxx-include-dir=$\(prefix\)/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux
From: Dara Hazeghi <dhazeghi@yahoo.com> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: java/7304: gcj-3.1 ICE Date: Mon, 12 May 2003 13:26:31 -0700 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- trail&database=gcc&pr=7304 Hello, this behavior still occurs in gcc 3.2, 3.3 branch and mainline (20030511) on i686-linux. Dara
Still occurs on mainline
Here is the backtrace: #0 0x0000c108 in not_accessible_field_error (wfl=0x40e1d2e0, decl=0x40ea50e0) at ../ ../gcc/java/parse.y:3168 #1 0x0001bf5c in resolve_field_access (qual_wfl=0x40e1d2a0, field_decl=0x0, field_type=0x0) at ../../gcc/java/parse.y:9838 #2 0x0001cff4 in patch_method_invocation (patch=0xbffff48c, primary=0x0, where= 0x40e1d2e0, from_super=3907760, is_static=0x0, ret_decl=0x0) at ../../gcc/java/ parse.y:10261 #3 0x0001e61c in java_complete_lhs (node=0xbffff48c) at ../../gcc/java/parse.y:12047 #4 0x000212b8 in java_complete_tree (node=0x40e6d734) at ../../gcc/java/ parse.y:11570 #5 0x0001e7cc in java_complete_lhs (node=0x40e1d320) at ../../gcc/java/parse.y:11964 #6 0x000212b8 in java_complete_tree (node=0x40e6d734) at ../../gcc/java/ parse.y:11570 #7 0x0001e998 in java_complete_lhs (node=0x40e6eb68) at ../../gcc/java/ parse.y:11691 #8 0x000212b8 in java_complete_tree (node=0x40e6eb68) at ../../gcc/java/ parse.y:11570 #9 0x00021434 in java_complete_expand_method (mdecl=0x40ea1000) at ../../gcc/ java/parse.y:8036 #10 0x00021924 in java_complete_expand_class (outer=0x40e6ad90) at ../../gcc/java/ parse.y:7719 #11 0x00024480 in java_expand_classes () at ../../gcc/java/parse.y:7646 #12 0x0004256c in java_parse_file (set_yydebug=4063248) at /Volumes/UFS_Partition/ pinskia/src/fsf/gcc-clean/src/gcc/java/jcf-parse.c:1119 #13 0x002aa338 in toplev_main (argc=3918732, argv=0x3bcc8c) at /Volumes/ UFS_Partition/pinskia/src/fsf/gcc-clean/src/gcc/toplev.c:1821 #14 0x00002700 in _start (argc=17, argv=0xbffffba4, envp=0xbffffbec) at /SourceCache/ Csu/Csu-46/crt.c:267 #15 0x00002574 in start ()
*** Bug 12307 has been marked as a duplicate of this bug. ***
Fixed for 3.5.0.