This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

java set_mem_alias_set abort


On Tue, Oct 02, 2001 at 06:50:33PM -0400, Richard Kenner wrote:
>     The following ICE occurs with todays cvs source:
> 
>     ../../../libjava/java/awt/Checkbox.java: In method `java.awt.Checkbox.getSelectedObjects()':
>     ../../../libjava/java/awt/Checkbox.java:89: Internal compiler error in set_mem_alias_set, at emit-rtl.c:1722
> 
> Right.  That's what I sent email about a little under an hour ago: this is
> a bug in the Java front-end, but I don't know Java so I can't say what
> the precise fix should be.

The bug appears to be invalid tree codes generated by the 
Java front end.  The tree that causes the abort is:

 <compound_expr 0x200004982c0
    type <pointer_type 0x2000006ced8
        type <record_type 0x2000006cd48 java.lang.String
	    asm_written type_2 type_4 BLK
            size <integer_cst 0x2000006b240 constant 192>
            unit size <integer_cst 0x200003d8bc0 constant 24>
            align 64 symtab 540555744 alias set -1
	    fields <field_decl 0x2000040e0c8>
            pointer_to_this <pointer_type 0x2000006ced8>
	    chain <type_decl 0x2000006ce10 java.lang.String>>
        unsigned asm_written DI
        size <integer_cst 0x2000006a940 constant 64>
        unit size <integer_cst 0x2000006aa00 constant 8>
        align 64 symtab 540555616 alias set 19
        pointer_to_this <pointer_type 0x2000047d450>>
    side-effects
    arg 0 <compound_expr 0x20000498280 ...>
    arg 1 <indirect_ref 0x20000493560
        type <pointer_type 0x2000006cc80
	    type <record_type 0x2000006caf0 java.lang.Object>
            unsigned asm_written DI size <integer_cst 0x2000006a940 64>
	    unit size <integer_cst 0x2000006aa00 8>
            align 64 symtab 548138688 alias set 31
            pointer_to_this <pointer_type 0x200003f2c80>>
        side-effects
        arg 0 <plus_expr 0x20000498140 type <pointer_type 0x20000069518>
            side-effects arg 0 <save_expr 0x2000048fd00>
            arg 1 <integer_cst 0x2000048fdc0 constant 16>>>>

Note that the type of the outer COMPOUND_EXPR does
not match the type of the inner INDIRECT_REF.

Hmm, actually, shouldn't we have done something special in
lang_get_alias_set so that java.lang.Object (the root of the
object heirarchy) does not conflict with java.lang.String?

I see that the C++ lang_get_alias_set contains 

  /* It's not yet safe to use alias sets for classes in C++ because
     the TYPE_FIELDs list for a class doesn't mention base classes.  */
  else if (c_language == clk_cplusplus && AGGREGATE_TYPE_P (t))
    return 0;

we may want the same thing here...


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]