From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8641 invoked by alias); 10 Sep 2004 16:54:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8385 invoked by uid 48); 10 Sep 2004 16:54:01 -0000 Date: Fri, 10 Sep 2004 16:54:00 -0000 Message-ID: <20040910165401.8384.qmail@sourceware.org> From: "daney at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040909181504.17380.daney@gcc.gnu.org> References: <20040909181504.17380.daney@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/17380] [4.0.0 Regression] Bad diagnostic and ICE on valid code... X-Bugzilla-Reason: CC X-SW-Source: 2004-09/txt/msg00979.txt.bz2 List-Id: ------- Additional Comments From daney at gcc dot gnu dot org 2004-09-10 16:53 ------- A simplified command line to recreate the problem: gcj --encoding=ISO-8859-1 --classpath src -c src/c/ProblemIsHere.java For what it's worth, here is a backtrace. There are several incorrect diagnostics before the ICE so it is possible that the problem is not in code that is in the trace. All of the error diagnostics are incorrect. This code compiles without any diagnostics with 3.3.1 and Sun's javac. It seems to be target independent as I get the same error on a i686-pc-linux/mipsel-linux cross compiler as well. $ gdb /newdisk/local/test35/bin/../libexec/gcc/i686-pc-linux-gnu/3.5.0/jc1 GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh) 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-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run src/c/ProblemIsHere.java -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fno-omit-frame-pointer -fkeep-inline-functions -quiet -dumpbase ProblemIsHere.java -mtune=pentiumpro -auxbase ProblemIsHere -g1 -version -fencoding=ISO-8859-1 -fclasspath=src -o /tmp/cc0HqI7j.s Starting program: /newdisk/local/test35/libexec/gcc/i686-pc-linux-gnu/3.5.0/jc1 src/c/ProblemIsHere.java -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fno-omit-frame-pointer -fkeep-inline-functions -quiet -dumpbase ProblemIsHere.java -mtune=pentiumpro -auxbase ProblemIsHere -g1 -version -fencoding=ISO-8859-1 -fclasspath=src -o /tmp/cc0HqI7j.s GNU Java version 3.5.0 20040907 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 3.3.2 20031022 (Red Hat Linux 3.3.2-1). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Class path starts here: src/ /usr/local/test35/share/java/libgcj-3.5.0.jar/ (system) (zip) src/c/ProblemIsHere.java: In class `c.ProblemIsHere$IA': src/c/ProblemIsHere.java: In method `c.ProblemIsHere$IA.render(f.AW)': src/c/ProblemIsHere.java:106: error: Can't access protected method `g.BP.isSelected' from `c.ProblemIsHere$IA'. if(m_p.isSelected(this)) { ^ src/c/ProblemIsHere.java: In class `c.ProblemIsHere': src/c/ProblemIsHere.java: In method `()': src/c/ProblemIsHere.java:15: error: final field `hourName' may not have been initialized src/c/ProblemIsHere.java:178: error: final field `labelWidth' may not have been initialized Program received signal SIGSEGV, Segmentation fault. maybe_yank_clinit (mdecl=0x40c8c0e8) at parse.y:7963 7963 parse.y: No such file or directory. in parse.y (gdb) bt #0 maybe_yank_clinit (mdecl=0x40c8c0e8) at parse.y:7963 #1 0x08064ac5 in java_complete_expand_method (mdecl=0x40c8c0e8) at parse.y:8103 #2 0x080638e4 in java_complete_expand_methods (class_decl=0x40261910) at parse.y:7784 #3 0x080636ea in java_complete_expand_classes () at parse.y:7692 #4 0x08067e3f in java_expand_classes () at parse.y:9004 #5 0x080af59c in java_parse_file (set_yydebug=0) at ../../gccmaincvs/gcc/gcc/java/jcf-parse.c:1148 #6 0x08343eca in compile_file () at ../../gccmaincvs/gcc/gcc/toplev.c:991 #7 0x08345669 in do_compile () at ../../gccmaincvs/gcc/gcc/toplev.c:2098 #8 0x083456cd in toplev_main (argc=20, argv=0xbffff6e4) at ../../gccmaincvs/gcc/gcc/toplev.c:2130 #9 0x080c05c7 in main (argc=20, argv=0xbffff6e4) at ../../gccmaincvs/gcc/gcc/main.c:35 (gdb) -- What |Removed |Added ---------------------------------------------------------------------------- Summary|Regression ICE on valid |[4.0.0 Regression] Bad |code... |diagnostic and ICE on valid | |code... http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17380