public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref
@ 2005-08-09 19:36 tromey at gcc dot gnu dot org
2005-08-10 23:11 ` [Bug java/23300] " tromey at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-08-09 19:36 UTC (permalink / raw)
To: java-prs
If I copy the current cvs classpath into the libjava build directory
and try to build, I get an ICE.
The problem occurs because of this code in build_field_ref:
if (! flag_syntax_only
&& (flag_indirect_dispatch
/* DECL_FIELD_OFFSET == 0 if we have no reference for
the field, perhaps because we couldn't find the class
in which the field is defined.
FIXME: We should investigate this. */
|| DECL_FIELD_OFFSET (field_decl) == 0))
... flag_indirect_dispatch is false, but we have DECL_FIELD_OFFSET==0
for a 'this$0' field. So, we wind up using the indirect dispatch code
anyway. This causes a later crash (we build a bogus tree since the
otable is NULL).
I haven't investigated why DECL_FIELD_OFFSET can be 0 here.
--
Summary: DECL_FIELD_OFFSET == 0 versus build_field_ref
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tromey at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
@ 2005-08-10 23:11 ` tromey at gcc dot gnu dot org
2005-08-10 23:22 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-08-10 23:11 UTC (permalink / raw)
To: java-prs
------- Additional Comments From tromey at gcc dot gnu dot org 2005-08-10 23:11 -------
Here's the failure:
/home/tromey/Merge/build/gcc/gcj
-B/home/tromey/Merge/build/i686-pc-linux-gnu/libjava/
-B/home/tromey/Merge/build/gcc/ -ffloat-store -fclasspath=
-fbootclasspath=/home/tromey/Merge/build/i686-pc-linux-gnu/libjava/classpath/lib
--encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -c -MT javax/swing.lo
-MD -MP -MF javax/swing.deps @javax/swing.list -fPIC -o javax/.libs/swing.o
../../../gcc/libjava/classpath/javax/swing/JPasswordField.java: In class
'javax.swing.JPasswordField$AccessibleJPasswordField':
../../../gcc/libjava/classpath/javax/swing/JPasswordField.java: In constructor
'(javax.swing.JPasswordField)':
../../../gcc/libjava/classpath/javax/swing/JPasswordField.java:61: internal
compiler error: Segmentation fault
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
2005-08-10 23:11 ` [Bug java/23300] " tromey at gcc dot gnu dot org
@ 2005-08-10 23:22 ` pinskia at gcc dot gnu dot org
2005-08-11 1:58 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-10 23:22 UTC (permalink / raw)
To: java-prs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |18131
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
2005-08-10 23:11 ` [Bug java/23300] " tromey at gcc dot gnu dot org
2005-08-10 23:22 ` pinskia at gcc dot gnu dot org
@ 2005-08-11 1:58 ` pinskia at gcc dot gnu dot org
2005-08-11 2:01 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-11 1:58 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-11 01:58 -------
[21:55] < pinskia> tromey: it is hitting class.c:2151
[21:55] < pinskia> which is causing the class not to be layout at all
Here is the backtrace:
#0 layout_class (this_class=0xb7cda78c) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/java/
class.c:2151
#1 0x0805646d in safe_layout_class (class=0x0) at parse.y:5637
#2 0x0809047e in maybe_layout_super_class (super_class=0xb7cda78c, this_class=0xb795e398)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/java/class.c:2068
#3 0x08095f5d in layout_class (this_class=0xb795e398) at /home/peshtigo/pinskia/src/gnu/gcc/src/
gcc/java/class.c:2147
#4 0x080d482e in read_class (name=0xb795d1e0) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/
java/jcf-parse.c:608
#5 0x080d4c82 in load_class (class_or_name=0xb795d1e0, verbose=1) at /home/peshtigo/pinskia/
src/gnu/gcc/src/gcc/java/jcf-parse.c:682
#6 0x080d5163 in load_inner_classes (cur_class=Variable "cur_class" is not available.
) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/java/jcf-parse.c:821
#7 0x080d4835 in read_class (name=0xb7952118) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/
java/jcf-parse.c:609
#8 0x080d4c82 in load_class (class_or_name=0xb7950284, verbose=1) at /home/peshtigo/pinskia/
src/gnu/gcc/src/gcc/java/jcf-parse.c:682
#9 0x080903d0 in maybe_layout_super_class (super_class=0xb7950284, this_class=0xb795033c)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/java/class.c:2070
#10 0x08095f5d in layout_class (this_class=0xb795033c) at /home/peshtigo/pinskia/src/gnu/gcc/
src/gcc/java/class.c:2147
#11 0x080d482e in read_class (name=0xb794f2a8) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/
java/jcf-parse.c:608
#12 0x080d4c82 in load_class (class_or_name=0xb794f2a8, verbose=0) at /home/peshtigo/pinskia/
src/gnu/gcc/src/gcc/java/jcf-parse.c:682
#13 0x08068e2f in do_resolve_class (enclosing=Variable "enclosing" is not available.
) at parse.y:6026
#14 0x080691b0 in resolve_class (enclosing=0xb78fe958, class_type=0xb7907a6c,
decl=0xb790de88, cl=0xb790de60) at parse.y:5850
#15 0x080695a3 in jdep_resolve_class (dep=0x991b660) at parse.y:5652
#16 0x08069d41 in java_complete_class () at parse.y:5703
#17 0x080d4a6c in read_class (name=0xb790be38) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/
java/jcf-parse.c:575
#18 0x080d4c82 in load_class (class_or_name=0xb790be38, verbose=0) at /home/peshtigo/pinskia/
src/gnu/gcc/src/gcc/java/jcf-parse.c:682
#19 0x08068e2f in do_resolve_class (enclosing=Variable "enclosing" is not available.
) at parse.y:6026
#20 0x080691b0 in resolve_class (enclosing=0xb7aad6e8, class_type=0xb7ab7f74,
decl=0xb7ac2000, cl=0xb7ac1898) at parse.y:5850
#21 0x080695a3 in jdep_resolve_class (dep=0x9915b00) at parse.y:5652
#22 0x08069d41 in java_complete_class () at parse.y:5703
#23 0x080d4a6c in read_class (name=0xb7ab3500) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/
java/jcf-parse.c:575
#24 0x080d4c82 in load_class (class_or_name=0xb7ab3500, verbose=0) at /home/peshtigo/pinskia/
src/gnu/gcc/src/gcc/java/jcf-parse.c:682
#25 0x08068e2f in do_resolve_class (enclosing=Variable "enclosing" is not available.
) at parse.y:6026
#26 0x080691b0 in resolve_class (enclosing=0xb7d1db60, class_type=0xb7d5e508,
decl=0xb7d5f730, cl=0xb7d5f6e0) at parse.y:5850
#27 0x080695a3 in jdep_resolve_class (dep=0x9832060) at parse.y:5652
#28 0x08069d41 in java_complete_class () at parse.y:5703
#29 0x080d4a6c in read_class (name=0xb7d216b8) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/
java/jcf-parse.c:575
#30 0x080d4c82 in load_class (class_or_name=0xb7d1f228, verbose=0) at /home/peshtigo/pinskia/
src/gnu/gcc/src/gcc/java/jcf-parse.c:682
#31 0x08068780 in do_resolve_class (enclosing=0xb7cb1138, import_type=0x0,
class_type=0xb7cd1bdc, decl=0x0, cl=Variable "cl" is not available.
) at parse.y:6030
#32 0x08068642 in do_resolve_class (enclosing=Variable "enclosing" is not available.
) at parse.y:3717
#33 0x080691b0 in resolve_class (enclosing=0xb7cb1138, class_type=0xb7cd1bdc,
decl=0xb7cb1138, cl=0xb7cd5f78) at parse.y:5850
#34 0x080695a3 in jdep_resolve_class (dep=0x97faa80) at parse.y:5652
#35 0x08069d41 in java_complete_class () at parse.y:5703
#36 0x080d5d21 in java_parse_file (set_yydebug=0) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/
java/jcf-parse.c:1280
#37 0x0839cd60 in toplev_main (argc=0, argv=0xbfea4624) at /home/peshtigo/pinskia/src/gnu/gcc/
src/gcc/toplev.c:971
#38 0x003e7ad4 in __libc_start_main () from /lib/tls/libc.so.6
#39 0x08049cd1 in _start ()
I cannot debug it further as I debugging with an optimized compiled.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-08-11 1:58 ` pinskia at gcc dot gnu dot org
@ 2005-08-11 2:01 ` pinskia at gcc dot gnu dot org
2005-08-11 2:39 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-11 2:01 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-11 02:01 -------
This is definetly not a regression.
Before 4.0.0, we got:
javax/swing/AbstractButton.java: In class `javax.swing.AbstractButton$AccessibleAbstractButton':
javax/swing/AbstractButton.java: In method `(javax.swing.AbstractButton)':
javax/swing/AbstractButton.java:2011: Internal compiler error in expand_expr, at expr.c:6865
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |3.4.0 3.0.4 3.3.3 4.0.0
| |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-08-11 2:01 ` pinskia at gcc dot gnu dot org
@ 2005-08-11 2:39 ` pinskia at gcc dot gnu dot org
2005-08-11 2:59 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-11 2:39 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-11 02:39 -------
More information, maybe_layout_super_class is returning NULL.
the Supper class is SynchronizedCollection.
This is for java.util.Collections$SynchronizedSet.
Which means we have a couple of issues like this.
do_resolve_class in maybe_layout_super_class is returning null.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-08-11 2:39 ` pinskia at gcc dot gnu dot org
@ 2005-08-11 2:59 ` pinskia at gcc dot gnu dot org
2005-08-11 3:06 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-11 2:59 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-11 02:59 -------
Huh, read_class is failing for java.util.SynchronizedCollection.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-08-11 2:59 ` pinskia at gcc dot gnu dot org
@ 2005-08-11 3:06 ` pinskia at gcc dot gnu dot org
2005-08-11 3:37 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-11 3:06 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-11 03:06 -------
(In reply to comment #5)
> Huh, read_class is failing for java.util.SynchronizedCollection.
Woops I was stupid, that should fail.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-08-11 3:06 ` pinskia at gcc dot gnu dot org
@ 2005-08-11 3:37 ` pinskia at gcc dot gnu dot org
2005-08-11 11:38 ` rmathew at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-11 3:37 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-11 03:37 -------
Hmm, I think we are not looking into the class's outer class's supper class but I don't know how to
prove this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-08-11 3:37 ` pinskia at gcc dot gnu dot org
@ 2005-08-11 11:38 ` rmathew at gcc dot gnu dot org
2005-08-15 19:38 ` tromey at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2005-08-11 11:38 UTC (permalink / raw)
To: java-prs
------- Additional Comments From rmathew at gcc dot gnu dot org 2005-08-11 11:38 -------
(In reply to comment #2)
>
>
> I cannot debug it further as I debugging with an optimized compiled.
cd $GCC_SRC_DIR/gcc/java
touch class.c parse.y
cd $GCC_BLD_DIR
make BOOT_CFLAGS='-g3 -O0' bubblestrap
http://gcc.gnu.org/wiki/DebuggingGCC
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-08-11 11:38 ` rmathew at gcc dot gnu dot org
@ 2005-08-15 19:38 ` tromey at gcc dot gnu dot org
2005-08-16 16:07 ` cvs-commit at gcc dot gnu dot org
2005-08-16 16:08 ` tromey at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-08-15 19:38 UTC (permalink / raw)
To: java-prs
------- Additional Comments From tromey at gcc dot gnu dot org 2005-08-15 19:38 -------
I submitted a patch.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |tromey at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-08-15 19:38:49
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-08-15 19:38 ` tromey at gcc dot gnu dot org
@ 2005-08-16 16:07 ` cvs-commit at gcc dot gnu dot org
2005-08-16 16:08 ` tromey at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-16 16:07 UTC (permalink / raw)
To: java-prs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-16 16:07 -------
Subject: Bug 23300
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tromey@gcc.gnu.org 2005-08-16 16:06:44
Modified files:
gcc/java : ChangeLog class.c expr.c
Log message:
PR java/23300.
* expr.c (build_field_ref): Don't generate otable reference when
DECL_FIELD_OFFSET is 0.
* class.c (maybe_layout_super_class): Pass outer class to
do_resolve_class.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1655&r2=1.1656
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/class.c.diff?cvsroot=gcc&r1=1.237&r2=1.238
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/expr.c.diff?cvsroot=gcc&r1=1.234&r2=1.235
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug java/23300] DECL_FIELD_OFFSET == 0 versus build_field_ref
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-08-16 16:07 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-16 16:08 ` tromey at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-08-16 16:08 UTC (permalink / raw)
To: java-prs
------- Additional Comments From tromey at gcc dot gnu dot org 2005-08-16 16:08 -------
I checked in a fix to the trunk.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-08-16 16:08 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-09 19:36 [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref tromey at gcc dot gnu dot org
2005-08-10 23:11 ` [Bug java/23300] " tromey at gcc dot gnu dot org
2005-08-10 23:22 ` pinskia at gcc dot gnu dot org
2005-08-11 1:58 ` pinskia at gcc dot gnu dot org
2005-08-11 2:01 ` pinskia at gcc dot gnu dot org
2005-08-11 2:39 ` pinskia at gcc dot gnu dot org
2005-08-11 2:59 ` pinskia at gcc dot gnu dot org
2005-08-11 3:06 ` pinskia at gcc dot gnu dot org
2005-08-11 3:37 ` pinskia at gcc dot gnu dot org
2005-08-11 11:38 ` rmathew at gcc dot gnu dot org
2005-08-15 19:38 ` tromey at gcc dot gnu dot org
2005-08-16 16:07 ` cvs-commit at gcc dot gnu dot org
2005-08-16 16:08 ` 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).