public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/17380] New: Regression ICE on valid code...
@ 2004-09-09 18:15 daney at gcc dot gnu dot org
  2004-09-09 18:17 ` [Bug java/17380] " daney at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2004-09-09 18:15 UTC (permalink / raw)
  To: java-prs

]$ gcj -g -Wall  -O3 -I/home/test35/bin/../include -Wno-redundant-modifiers
--encoding=ISO-8859-1 --classpath src  -c src/c/ProblemIsHere.java
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 `<clinit>()':
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
src/c/ProblemIsHere.java:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


The first error is bogus as Sun's javac, eclipse 3.0 and GCJ 3.3.1 all compile
it with no complaints.

This works with GCJ-3.3.1

Testcase to follow.

-- 
           Summary: Regression ICE on valid code...
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, diagnostic
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: daney at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17380


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/17380] Regression ICE on valid code...
  2004-09-09 18:15 [Bug java/17380] New: Regression ICE on valid code daney at gcc dot gnu dot org
@ 2004-09-09 18:17 ` daney at gcc dot gnu dot org
  2004-09-10 16:54 ` [Bug java/17380] [4.0.0 Regression] Bad diagnostic and " daney at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2004-09-09 18:17 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From daney at gcc dot gnu dot org  2004-09-09 18:17 -------
Created an attachment (id=7083)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7083&action=view)
Testcase

Untar and run:

gcj -g -Wall  -O3 -I/home/test35/bin/../include -Wno-redundant-modifiers
--encoding=ISO-8859-1 --classpath src  -c src/c/ProblemIsHere.java

I am using:
$ gcj --version
gcj (GCC) 3.5.0 20040907 (experimental)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17380


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/17380] [4.0.0 Regression] Bad diagnostic and ICE on valid code...
  2004-09-09 18:15 [Bug java/17380] New: Regression ICE on valid code daney at gcc dot gnu dot org
  2004-09-09 18:17 ` [Bug java/17380] " daney at gcc dot gnu dot org
@ 2004-09-10 16:54 ` daney at gcc dot gnu dot org
  2004-09-15  1:29 ` reichelt at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2004-09-10 16:54 UTC (permalink / raw)
  To: java-prs


------- 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 `<clinit>()':
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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/17380] [4.0.0 Regression] Bad diagnostic and ICE on valid code...
  2004-09-09 18:15 [Bug java/17380] New: Regression ICE on valid code daney at gcc dot gnu dot org
  2004-09-09 18:17 ` [Bug java/17380] " daney at gcc dot gnu dot org
  2004-09-10 16:54 ` [Bug java/17380] [4.0.0 Regression] Bad diagnostic and " daney at gcc dot gnu dot org
@ 2004-09-15  1:29 ` reichelt at gcc dot gnu dot org
  2004-09-22 21:41 ` tromey at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-09-15  1:29 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-09-15 01:29 -------
Here's a reduced invalid testcase that crashes the compiler:

=============================
class A
{
    class B
    {
        void foo()
        {
            bar();
        }
    }

    static final int i = 0;
}
=============================


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-15 01:29:37
               date|                            |
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17380


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/17380] [4.0.0 Regression] Bad diagnostic and ICE on valid code...
  2004-09-09 18:15 [Bug java/17380] New: Regression ICE on valid code daney at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-09-15  1:29 ` reichelt at gcc dot gnu dot org
@ 2004-09-22 21:41 ` tromey at gcc dot gnu dot org
  2004-09-23  0:36 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-09-22 21:41 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2004-09-22 21:41 -------
The reduced test case doesn't cause a crash for me.

On the original test case, I believe the earlier errors
cause the crash.  Fixing the permissions-checking bug
implied by the first error message makes the ICE go away.

I'm testing my fix more comprehensively.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tromey at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17380


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/17380] [4.0.0 Regression] Bad diagnostic and ICE on valid code...
  2004-09-09 18:15 [Bug java/17380] New: Regression ICE on valid code daney at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-09-22 21:41 ` tromey at gcc dot gnu dot org
@ 2004-09-23  0:36 ` pinskia at gcc dot gnu dot org
  2004-09-23 16:21 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-23  0:36 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-23 00:36 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02327.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17380


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/17380] [4.0.0 Regression] Bad diagnostic and ICE on valid code...
  2004-09-09 18:15 [Bug java/17380] New: Regression ICE on valid code daney at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-09-23 16:21 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-23 16:21 ` cvs-commit at gcc dot gnu dot org
  2004-09-23 16:23 ` tromey at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-23 16:21 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-23 16:21 -------
Subject: Bug 17380

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tromey@gcc.gnu.org	2004-09-23 16:21:35

Modified files:
	gcc/java       : ChangeLog parse.y 

Log message:
	PR java/17380:
	* parse.y (not_accessible_p): Allow access to protected members
	even when class is not static.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1458&r2=1.1459
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/parse.y.diff?cvsroot=gcc&r1=1.506&r2=1.507



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17380


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/17380] [4.0.0 Regression] Bad diagnostic and ICE on valid code...
  2004-09-09 18:15 [Bug java/17380] New: Regression ICE on valid code daney at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-09-23  0:36 ` pinskia at gcc dot gnu dot org
@ 2004-09-23 16:21 ` cvs-commit at gcc dot gnu dot org
  2004-09-23 16:21 ` cvs-commit at gcc dot gnu dot org
  2004-09-23 16:23 ` tromey at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-23 16:21 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-23 16:20 -------
Subject: Bug 17380

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tromey@gcc.gnu.org	2004-09-23 16:20:50

Modified files:
	libjava        : ChangeLog 
	libjava/testsuite/libjava.jacks: jacks.xfail 

Log message:
	PR java/17380:
	* testsuite/libjava.jacks/jacks.xfail: Added 9.2-implicit-6 and
	9.2-implicit-7.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3070&r2=1.3071
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.jacks/jacks.xfail.diff?cvsroot=gcc&r1=1.17&r2=1.18



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17380


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug java/17380] [4.0.0 Regression] Bad diagnostic and ICE on valid code...
  2004-09-09 18:15 [Bug java/17380] New: Regression ICE on valid code daney at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-09-23 16:21 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-23 16:23 ` tromey at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-09-23 16:23 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2004-09-23 16:23 -------
Fix checked in.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17380


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-09-23 16:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-09 18:15 [Bug java/17380] New: Regression ICE on valid code daney at gcc dot gnu dot org
2004-09-09 18:17 ` [Bug java/17380] " daney at gcc dot gnu dot org
2004-09-10 16:54 ` [Bug java/17380] [4.0.0 Regression] Bad diagnostic and " daney at gcc dot gnu dot org
2004-09-15  1:29 ` reichelt at gcc dot gnu dot org
2004-09-22 21:41 ` tromey at gcc dot gnu dot org
2004-09-23  0:36 ` pinskia at gcc dot gnu dot org
2004-09-23 16:21 ` cvs-commit at gcc dot gnu dot org
2004-09-23 16:21 ` cvs-commit at gcc dot gnu dot org
2004-09-23 16:23 ` tromey at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).