Bug 28458 - [ecj] Fails to build gnu.awt.LightweightRedirector
Summary: [ecj] Fails to build gnu.awt.LightweightRedirector
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Andrew Haley
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-22 21:32 UTC by Andrew John Hughes
Modified: 2006-08-28 16:54 UTC (History)
2 users (show)

See Also:
Host: x86_64-linux-gnu
Target: x86_64-linux-gnu
Build: x86_64-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2006-07-24 10:13:17


Attachments
Class file being compiled (1.56 KB, application/x-java)
2006-07-22 21:34 UTC, Andrew John Hughes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew John Hughes 2006-07-22 21:32:36 UTC
gcj -v -B/home/gandalf/projects/java/classpath/gcj/build/x86_64-unknown-linux-gnu/libjava/ -B/home/gandalf/projects/java/classpath/gcj/build/gcc/ -fomit-frame-pointer -fclasspath= -fbootclasspath=/home/gandalf/projects/java/classpath/gcj/build/x86_64-unknown-linux-gnu/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -fsource-filename=/home/gandalf/projects/java/classpath/gcj/build/x86_64-unknown-linux-gnu/libjava/classpath/lib/classes -MT gnu/awt.lo -MD -MP -MF gnu/awt.deps @gnu/awt.list -fPIC -o gnu/.libs/awt.o
Reading specs from /home/gandalf/projects/java/classpath/gcj/build/gcc/specs
Reading specs from /home/gandalf/projects/java/classpath/gcj/build/x86_64-unknown-linux-gnu/libjava/libgcj.spec
rename spec lib to liborig
Target: x86_64-unknown-linux-gnu
Configured with: /home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/configure --prefix=/home/gandalf/projects/java/classpath/gcj/install --disable-multilib --enable-languages=c,c++,java --enable-java-awt=gtk
Thread model: posix
gcc version 4.2.0 20060604 (gcj-eclipse experimental)
 /home/gandalf/projects/java/classpath/gcj/build/gcc/jc1 classpath/lib/gnu/awt/LightweightRedirector.class -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase LightweightRedirector.class -mtune=generic -auxbase-strip gnu/.libs/awt.o -g -O2 -Wno-deprecated -version -fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes -fsource-filename=/home/gandalf/projects/java/classpath/gcj/build/x86_64-unknown-linux-gnu/libjava/classpath/lib/classes -fPIC -fbootclasspath=./:/home/gandalf/projects/java/classpath/gcj/build/x86_64-unknown-linux-gnu/libjava/classpath/lib/ -faux-classpath /tmp/ccNqEVSq.zip -o /tmp/cc0NqHDH.s
GNU Java version 4.2.0 20060604 (gcj-eclipse experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.2.0 20060604 (gcj-eclipse experimental).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128404
Class path starts here:
    /tmp/ccNqEVSq.zip/ (zip)
    ./ (system)
    /home/gandalf/projects/java/classpath/gcj/build/x86_64-unknown-linux-gnu/libjava/classpath/lib/ (system)
/home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/libjava/gnu/awt/LightweightRedirector.java:180: internal compiler error: in make_class_data, at java/class.c:1885
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Andrew John Hughes 2006-07-22 21:34:02 UTC
Created attachment 11922 [details]
Class file being compiled
Comment 2 Andrew John Hughes 2006-07-22 21:40:20 UTC
#0  internal_error (gmsgid=0x840454 "in %s, at %s:%d")
    at /home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/gcc/diagnostic.c:582
#1  0x00000000004c018c in fancy_abort (file=<value optimized out>, line=1885,
    function=0x8253b0 "make_class_data")
    at /home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/gcc/diagnostic.c:642
#2  0x000000000042c21e in make_class_data (type=<value optimized out>)
    at /home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/gcc/java/class.c:1885
#3  0x000000000042c4e5 in finish_class ()
    at /home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/gcc/java/class.c:2059
#4  0x0000000000444f38 in parse_class_file ()
    at /home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/gcc/java/jcf-parse.c:1146
#5  0x0000000000447a92 in java_parse_file (set_yydebug=<value optimized out>)
    at /home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/gcc/java/jcf-parse.c:1505
#6  0x000000000069db4e in toplev_main (argc=<value optimized out>, argv=<value optimized out>)
    at /home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/gcc/toplev.c:999
#7  0x00002b6cd42784ca in __libc_start_main () from /lib/libc.so.6
#8  0x000000000040296a in _start () at ../sysdeps/x86_64/elf/start.S:113
Comment 3 Andrew John Hughes 2006-07-22 21:56:25 UTC
 <record_type 0x2afd15eb52c0 gnu.awt.LightweightRedirector type_2 type_4 type_5 BLK
    size <integer_cst 0x2afd15e2ef30 type <integer_type 0x2afd15e3a0b0 bit_size_type> constant invariant 128>
    unit size <integer_cst 0x2afd15ec0b10 type <integer_type 0x2afd15e3a2c0 int> constant invariant 16>
    align 64 symtab 369628368 alias set -1
    fields <field_decl 0x2afd15e52900 D.654
        type <record_type 0x2afd15e4a4d0 java.lang.Object tree_3 type_2 type_4 DI
            size <integer_cst 0x2afd15e2ebd0 constant invariant 64>
            unit size <integer_cst 0x2afd15ec0ab0 constant invariant 8>
            align 64 symtab 369629040 alias set -1 fields <field_decl 0x2afd15e49840 vtable>
            pointer_to_this <pointer_type 0x2afd15e4a580> chain <type_decl 0x2afd15e3edd0 java.lang.Object>>
        ignored DI file /home/gandalf/projects/java/classpath/gcj/sources/gcj-eclipse-jmx/libjava/gnu/awt/LightweightRedirector.java line 0 size <integer_cst 0x2afd15e2ebd0 64> unit size <integer_cst 0x2afd15ec0ab0 8>
        align 64 offset_align 128
        offset <integer_cst 0x2afd15e2e6f0 constant invariant 0>
        bit offset <integer_cst 0x2afd15e2eed0 constant invariant 0>
        chain <var_decl 0x2afd15eb5dc0 LAST_BUTTON_NUMBER type <integer_type 0x2afd15e3a2c0 int>
            asm_written used public static decl_3 SI file gnu/awt/LightweightRedirector.java line 0
            size <integer_cst 0x2afd15e2ea80 constant invariant 32>
            unit size <integer_cst 0x2afd15e2e6c0 constant invariant 4>
            align 32 context <record_type 0x2afd15eb52c0 gnu.awt.LightweightRedirector> initial <integer_cst 0x2afd15e51d20 3>
            (mem/c/i:SI (symbol_ref:DI ("_ZN3gnu3awt21LightweightRedirector18LAST_BUTTON_NUMBERE") <var_decl 0x2afd15eb5dc0 LAST_BUTTON_NUMBER>) [0 LAST_BUTTON_NUMBER+0 S4 A32]) chain <field_decl 0x2afd15e52840 releaseTargets>>>
    pointer_to_this <pointer_type 0x2afd15eb5370> chain <type_decl 0x2afd15e4cb60 gnu.awt.LightweightRedirector>>
Comment 4 Andrew John Hughes 2006-07-22 22:02:25 UTC
(gdb) call debug_tree(cons)
 <constructor 0x2afd16299840
    type <record_type 0x2afd15e4a790 java.lang.Class tree_3 type_2 type_4 BLK
        size <integer_cst 0x2afd15e44f30 constant invariant 2240>
        unit size <integer_cst 0x2afd16274030 constant invariant 280>
        align 64 symtab 0 alias set -1
        fields <var_decl 0x2afd1627a9a0 class$0 type <pointer_type 0x2afd15e4a840>
            public static unsigned DI file java/lang/Class.java line 0
            size <integer_cst 0x2afd15e2ebd0 constant invariant 64>
            unit size <integer_cst 0x2afd15e2ec00 constant invariant 8>
            align 64 context <record_type 0x2afd15e4a790 java.lang.Class> chain <field_decl 0x2afd15e50480 D.83>>
        pointer_to_this <pointer_type 0x2afd15e4a840> chain <type_decl 0x2afd15e4c000 java.lang.Class>>
   >
(gdb) call debug_tree(temp)
 <constructor 0x2afd16299810
    type <record_type 0x2afd15e4a4d0 java.lang.Object tree_3 type_2 type_4 DI
        size <integer_cst 0x2afd15e2ebd0 constant invariant 64>
        unit size <integer_cst 0x2afd15ec0ab0 constant invariant 8>
        align 64 symtab 369629040 alias set -1
        fields <field_decl 0x2afd15e49840 vtable type <pointer_type 0x2afd15e4d2c0>
            private unsigned DI file <built-in> line 0 size <integer_cst 0x2afd15e2ebd0 64>
            unit size <integer_cst 0x2afd15e2ec00 constant invariant 8>
            align 64 offset_align 128
            offset <integer_cst 0x2afd15e2e6f0 constant invariant 0>
            bit offset <integer_cst 0x2afd15e2eed0 constant invariant 0> context <record_type 0x2afd15e4a4d0 java.lang.Object>>
        pointer_to_this <pointer_type 0x2afd15e4a580> chain <type_decl 0x2afd15e3edd0 java.lang.Object>>
   >
Comment 5 Andrew Haley 2006-07-24 11:39:46 UTC
Works for me.

 $ ~/gcc/gcj-eclipse/obj-x86_64-unknown-linux-gnu/gcc/jc1 /tmp/LightweightRedirector.class -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase LightweightRedirector.class -mtune=generic -auxbase-strip gnu/.libs/awt.o -g -O2 -Wno-deprecated -version -fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes -fsource-filename=$HOME/gcc/gcj-eclipse/obj-x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/libjava/classpath/lib/classes -fPIC -fbootclasspath=./:$HOME/gcc/gcj-eclipse/obj-x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/libjava/classpath/lib/ -faux-classpath /tmp/ccNqEVSq.zip -o /tmp/cc0NqHDH.s
GNU Java version 4.2.0 20060604 (gcj-eclipse experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.2.0 20060604 (gcj-eclipse experimental).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Class path starts here:
    /tmp/ccNqEVSq.zip/ (zip)
    ./ (system)
    /home/aph/gcc/gcj-eclipse/obj-x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/libjava/classpath/lib/ (system)
 $ 
Comment 6 Andrew John Hughes 2006-07-24 20:16:48 UTC
Does your compiled version of java.lang.Class contain a field class$0?  This is what me and Tom narrowed the problem down to.
Comment 7 Andrew Haley 2006-07-25 09:43:18 UTC
No, my java.lang.Class does not contain Class$0.  Please attach yours.
Comment 8 Andrew Haley 2006-07-25 10:00:48 UTC
I recompiled everything.  Still:

Reading .class from x86_64-unknown-linux-gnu/libjava/libgcj-4.2.0.jar(java/lang/Class.class).
Magic number: 0xcafebabe, minor_version: 0, major_version: 49.

Access flags: 0x31 public final super
This class: java.lang.Class, super: java.lang.Object
Interfaces (count: 4):
- Implements: java.lang.reflect.Type
- Implements: java.lang.reflect.AnnotatedElement
- Implements: java.lang.reflect.GenericDeclaration
- Implements: java.io.Serializable

Fields (count: 0):

Comment 9 Andrew Haley 2006-08-28 16:54:35 UTC
.