This is the mail archive of the 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]
Other format: [Raw text]

Re: [PATCH]: Fix debug/17924 and debug/19191, take two

On Tue, 2005-01-04 at 13:15 +0530, Ranjit Mathew wrote:
> Daniel Berlin wrote:
> > This is an updated patch to fix debug/17924 and debug/19191, both 4.0 
> > regressions (17924 is the dwarf-die7.c testsuite failure).
> Hi Daniel,
>   I'm seeing a new Java failure (i686-pc-linux-gnu, --disable-checking):
>   FAIL: String_overflow -O3 compilation from source
> It is an ICE in dwarf2out.c at "-O3 -g".
> Simple way to reproduce:
>   gcj -O3 -g -c

This is really failing trying to add the abstract origin attribute,
because of what appears to be a messed up block situation.

We have the following situation:

an inlined variable with a decl_abstract_origin of:
	the original variable, with a context of:
		a function named valueOf

However, valueOf's DECL_INITIAL is just a single block with nothing in
it, which makes no sense (since the block, or one of it's subblocks,
should contain the original variable).:
ie, we have valueof, like so:

(gdb) p debug_tree (decl.decl.initial)
 <block 0x40094958
    type <void_type 0x40028bd0 void asm_written VOID
        align 1 symtab 0 alias set 67
        pointer_to_this <pointer_type 0x40028ca8> chain <type_decl
0x40028c3c void>>

(gdb) p debug_tree (decl)
 <function_decl 0x4005d72c valueOf
    type <function_type 0x40039dec
        type <void_type 0x40028bd0 void asm_written VOID
            align 1 symtab 0 alias set 67
            pointer_to_this <pointer_type 0x40028ca8> chain <type_decl
0x40028c3c void>>
        size <integer_cst 0x400211c8 constant invariant 8>
        unit size <integer_cst 0x400211e0 constant invariant 1>
        align 8 symtab 0 alias set -1
        arg-types <tree_list 0x40021d20 value <void_type 0x40028bd0
        pointer_to_this <pointer_type 0x40090c3c>>
    addressable public abstract autoinline decl_2 QI file line 97
    context <record_type 0x40057ca8 String_overflow>
    result <result_decl 0x400a65e8 type <void_type 0x40028bd0 void>
        ignored VOID file line 97
        align 1 context <function_decl 0x4005d72c valueOf>> initial
<block 0x40094958>
    (mem:QI (symbol_ref:SI ("_ZN15String_overflow7valueOfEv") [flags
0x3] <function_decl 0x4005d72c valueOf>) [0 S1 A8])
    saved-insns 0x400c4f00 chain <function_decl 0x4005daf8 main>>

and we have an original variable, that claims to be in valueOf
<var_decl 0x4005d804 array
    type <pointer_type 0x4005b438
        type <record_type 0x4005b360 char[] type <char_type 0x40028dec
            asm_written type_1 BLK
            size <integer_cst 0x400213d8 constant invariant 64>
            unit size <integer_cst 0x400213f0 constant invariant 8>
            align 32 symtab 1074730884 alias set 60 fields <field_decl
            pointer_to_this <pointer_type 0x4005b438>>
        asm_written unsigned SI
        size <integer_cst 0x40021330 constant invariant 32>
        unit size <integer_cst 0x40021150 constant invariant 4>
        align 32 symtab 1074730832 alias set 41>
    tree_6 unsigned SI file line 98 size
<integer_cst 0x40021330 32> unit size <integer_cst 0x40021150 4>
    align 32 context <function_decl 0x4005d72c valueOf>>

but it's not in any of the blocks in valueOf.

Can somebody with knowledge of the java frontend explain to me why the
block doesn't contain the variables?

Note that it doesn't contain the variables before optimization, so it's
not that they are getting removed, AFAICT.

I imagine this is another latent bug.
We probably just didn't output debug info for this before, so this was
never discovered.


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