I have reduced this test case as much I could. The fact that it doesn't seem reducable any further suggests that this is a highly unlikely-to-be-hit corner case :) # cat ThreadSpawnerThread.java public class ThreadSpawnerThread extends Thread { public static class AvailableQueue { public class WorkerThread extends Thread { private WorkerThread () { start (); } } } } # gcj -C ThreadSpawnerThread.java ThreadSpawnerThread.java: In class 'ThreadSpawnerThread$AvailableQueue$WorkerThread': ThreadSpawnerThread.java: In constructor '(ThreadSpawnerThread$AvailableQueue)': ThreadSpawnerThread.java:8: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. # gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.0-beta20050730 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0-beta20050730/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20050730 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20050730/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20050730/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0-beta20050730/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --enable-java-awt=gtk --enable-languages=c,c++,java --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 4.1.0 20050730 (experimental)
Confirmed, a regression in that we rejected this in 3.0.4 (even though that is not the correct thing to do): t.java: In class `ThreadSpawnerThread$AvailableQueue$WorkerThread': t.java: In method `()': t.java:15: Undefined variable `this$0'. } ^ 1 error
Backtrace: #0 0x08066846 in java_complete_lhs (node=0x0) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:11665 #1 0x08066757 in java_complete_tree (node=0x0) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:11628 #2 0x0806518b in maybe_use_access_method (is_super_init=0, mdecl=0xbfc1365c, this_arg=0xbfc13658) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:10971 #3 0x08064991 in patch_method_invocation (patch=0xb7c39e60, primary=0x0, where=0x0, from_super=0, is_static=0x0, ret_decl=0xbfc1371c) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:10754 #4 0x080679a8 in java_complete_lhs (node=0xb7c39e60) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:12130 #5 0x08066757 in java_complete_tree (node=0xb7c39e60) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:11628 #6 0x08067666 in java_complete_lhs (node=0xb7c39e88) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:12038 #7 0x08066757 in java_complete_tree (node=0xb7c39e88) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:11628 #8 0x08066aa0 in java_complete_lhs (node=0xb7c090d0) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:11748 #9 0x08066757 in java_complete_tree (node=0xb7c090d0) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:11628 #10 0x0805f911 in java_complete_expand_method (mdecl=0xb7c38480) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:8191 #11 0x0805effe in java_complete_expand_methods (class_decl=0xb7c172d8) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:7885 #12 0x0805ef5d in java_complete_expand_class (outer=0xb7c172d8) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:7846 #13 0x0805ef44 in java_complete_expand_class (outer=0xb7c17208) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:7844 #14 0x0805ef44 in java_complete_expand_class (outer=0xb7c17138) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:7844 #15 0x0805ef15 in java_complete_expand_classes () at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:7827 #16 0x080618cb in java_expand_classes () at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/parse.y:9243 #17 0x080a99eb in java_parse_file (set_yydebug=0) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/java/jcf-parse.c:1309 #18 0x08373b6d in compile_file () at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/toplev.c:971 #19 0x08375271 in do_compile () at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/toplev.c:1914 #20 0x083752d3 in toplev_main (argc=14, argv=0xbfc13c54) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/toplev.c:1946 #21 0x080babea in main (argc=14, argv=0xbfc13c54) at /var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/gcc/main.c:35
Fixed by my fix to bug 23230 *** This bug has been marked as a duplicate of 23230 ***