From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7355 invoked by alias); 24 Oct 2004 21:08:24 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 7335 invoked by uid 48); 24 Oct 2004 21:08:24 -0000 Date: Sun, 24 Oct 2004 21:08:00 -0000 From: "kon at iki dot fi" To: java-prs@gcc.gnu.org Message-ID: <20041024210817.18130.kon@iki.fi> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/18130] New: ICE when static class extends inner class X-Bugzilla-Reason: CC X-SW-Source: 2004-q4/txt/msg00209.txt.bz2 List-Id: I doubt this code is valid, but anyway, GCC should display a proper error message rather than just crash. I am using a GCC checked out from CVS HEAD yesterday. I also get an ICE with GCC 3.3.4-11 and 3.4.1-17 from Debian, but i haven't tried the corresponding FSF releases. --- Source file --- class ICE_InnerClass { class First { } static class Second extends First { } } --- Invocation --- $ gcj -v -C ICE_InnerClass.java Reading specs from /home/kalle/stow/gcc/i386-pc-linux-gnu/bin/../lib/gcc/i386-pc-linux-gnu/4.0.0/specs Configured with: /home/kalle/src/FOREIGN-CVS/gcc/configure --prefix=/home/kalle --exec-prefix=/home/kalle/i386-pc-linux-gnu --host=i386-pc-linux-gnu --build=i386-pc-linux-gnu --enable-maintainer-mode --with-x-toolkit=gtk Thread model: posix gcc version 4.0.0 20041023 (experimental) /home/kalle/stow/gcc/i386-pc-linux-gnu/bin/../libexec/gcc/i386-pc-linux-gnu/4.0.0/jc1 ICE_InnerClass.java -quiet -dumpbase ICE_InnerClass.java -auxbase-strip NONE -g1 -version -fsyntax-only -femit-class-files -o /dev/null GNU Java version 4.0.0 20041023 (experimental) (i386-pc-linux-gnu) compiled by GNU C version 3.3.4 (Debian 1:3.3.4-11). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Class path starts here: /home/kalle/pikkuohjelmat/java/ /home/kalle/stow/gcc/i386-pc-linux-gnu/bin/../lib/gcc/../../../share/java/libgcj-4.0.0.jar/ (system) (zip) ICE_InnerClass.java: In class 'ICE_InnerClass$Second': ICE_InnerClass.java: In constructor '()': ICE_InnerClass.java:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. --- Backtrace --- $ gdb /home/kalle/stow/gcc/i386-pc-linux-gnu/bin/../libexec/gcc/i386-pc-linux-gnu/4.0.0/jc1 GNU gdb 6.0-debian Copyright 2003 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-linux"... (gdb) set args ICE_InnerClass.java -quiet -dumpbase ICE_InnerClass.java -auxbase-strip NONE -g1 -version -fsyntax-only -femit-class-files -o /dev/null (gdb) run Starting program: /home/kalle/stow/gcc/i386-pc-linux-gnu/libexec/gcc/i386-pc-linux-gnu/4.0.0/jc1 ICE_InnerClass.java -quiet -dumpbase ICE_InnerClass.java -auxbase-strip NONE -g1 -version -fsyntax-only -femit-class-files -o /dev/null GNU Java version 4.0.0 20041023 (experimental) (i386-pc-linux-gnu) compiled by GNU C version 3.3.4 (Debian 1:3.3.4-11). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Class path starts here: /home/kalle/pikkuohjelmat/java/ /home/kalle/share/java/libgcj-4.0.0.jar/ (system) (zip) Program received signal SIGSEGV, Segmentation fault. java_complete_lhs (node=0x0) at parse.y:11606 11606 if (TREE_TYPE (node) && TREE_CODE (node) != CONVERT_EXPR) (gdb) backtrace #0 java_complete_lhs (node=0x0) at parse.y:11606 #1 0x08076f44 in java_complete_tree (node=0x0) at parse.y:11568 #2 0x08071e5d in patch_method_invocation (patch=0x40197140, primary=0x0, where=0x0, from_super=0, is_static=0x0, ret_decl=0xbffff634) at parse.y:10794 #3 0x08078d57 in java_complete_lhs (node=0x40197140) at parse.y:12076 #4 0x08076f44 in java_complete_tree (node=0x40197140) at parse.y:11568 #5 0x08077519 in java_complete_lhs (node=0x401613dc) at parse.y:11689 #6 0x08076f44 in java_complete_tree (node=0x401613dc) at parse.y:11568 #7 0x08069c88 in java_complete_expand_method (mdecl=0x401956cc) at parse.y:8243 #8 0x08068a50 in java_complete_expand_methods (class_decl=0x40190e80) at parse.y:7932 #9 0x08068571 in java_complete_expand_class (outer=0x40190a6c) at parse.y:7891 #10 0x080684ae in java_complete_expand_classes () at parse.y:7874 #11 0x0806dcbd in java_expand_classes () at parse.y:9199 #12 0x080c533b in java_parse_file (set_yydebug=0) at /home/kalle/src/FOREIGN-CVS/gcc/gcc/java/jcf-parse.c:1209 #13 0x083dc15f in compile_file () at /home/kalle/src/FOREIGN-CVS/gcc/gcc/toplev.c:986 #14 0x083ddae5 in do_compile () at /home/kalle/src/FOREIGN-CVS/gcc/gcc/toplev.c:2074 #15 0x083ddb55 in toplev_main (argc=0, argv=0xbffff934) at /home/kalle/src/FOREIGN-CVS/gcc/gcc/toplev.c:2106 #16 0x080da13b in main (argc=0, argv=0x0) at /home/kalle/src/FOREIGN-CVS/gcc/gcc/main.c:35 -- Summary: ICE when static class extends inner class Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: minor Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kon at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org GCC build triplet: i386-pc-linux-gnu GCC host triplet: i386-pc-linux-gnu GCC target triplet: i386-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18130