[Bug tree-optimization/19241] [4.0 Regression] ICE in make_decl_rtl with inliner

steven at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jan 12 11:45:00 GMT 2005


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-12 11:45 -------
We choque on expanding this: 
 
inline void Iterator::IsEnd () const 
{ 
  compare (this, static_cast<const Map*>(0)->end()); 
} 
 
Which looks like this at -O: 
compare (&D.2008, &D.2013) 
 
(gdb) 
#11 0x00000000007008d1 in expand_call (exp=0x2a959f6820, target=0x0, ignore=1) 
at calls.c:2543 
2543          precompute_register_parameters (num_actuals, args, 
&reg_parm_seen); 
(gdb) p debug_tree(args[0]->tree_value) 
 <addr_expr 0x2a959f4ec0 
    type <pointer_type 0x2a959e0340 
        type <record_type 0x2a959d79c0 Iterator addressable needs-constructing 
type_1 type_5 BLK 
            size <integer_cst 0x2a95890690 constant invariant 8> 
            unit size <integer_cst 0x2a958906c0 constant invariant 1> 
            align 8 symtab 0 alias set -1 fields <type_decl 0x2a959e0000 
Iterator> 
           needs-constructor X() X(constX&) this=(X&) n_parents=0 
use_template=0 interface-unknown 
            pointer_to_this <pointer_type 0x2a959e0340> reference_to_this 
<reference_type 0x2a959e5680> chain <type_decl 0x2a959d7b60 Iterator>> 
        public unsigned DI 
        size <integer_cst 0x2a95890c30 constant invariant 64> 
        unit size <integer_cst 0x2a95890c60 constant invariant 8> 
        align 64 symtab 0 alias set -1> 
    invariant 
    arg 0 <var_decl 0x2a959f7680 type <record_type 0x2a959d79c0 Iterator> 
        addressable used ignored BLK file t.C line 22 size <integer_cst 
0x2a95890690 8> unit size <integer_cst 0x2a958906c0 1> 
        align 8 context <function_decl 0x2a959de410 end> abstract_origin 
<var_decl 0x2a959e3000> 
        (mem/s:BLK (plus:DI (reg/f:DI 54 virtual-stack-vars) 
        (const_int -1 [0xffffffffffffffff])) [0 D.2013+0 S1 A8])>> 
$18 = void 
(gdb) p debug_tree(args[1]->tree_value) 
 <addr_expr 0x2a959f8d40 
    type <pointer_type 0x2a959e0340 
        type <record_type 0x2a959d79c0 Iterator addressable needs-constructing 
type_1 type_5 BLK 
            size <integer_cst 0x2a95890690 constant invariant 8> 
            unit size <integer_cst 0x2a958906c0 constant invariant 1> 
            align 8 symtab 0 alias set -1 fields <type_decl 0x2a959e0000 
Iterator> 
           needs-constructor X() X(constX&) this=(X&) n_parents=0 
use_template=0 interface-unknown 
            pointer_to_this <pointer_type 0x2a959e0340> reference_to_this 
<reference_type 0x2a959e5680> chain <type_decl 0x2a959d7b60 Iterator>> 
        public unsigned DI 
        size <integer_cst 0x2a95890c30 constant invariant 64> 
        unit size <integer_cst 0x2a95890c60 constant invariant 8> 
        align 64 symtab 0 alias set -1> 
    invariant 
    arg 0 <var_decl 0x2a959f7270 type <record_type 0x2a959d79c0 Iterator> 
        addressable used ignored BLK file t.C line 22 size <integer_cst 
0x2a95890690 8> unit size <integer_cst 0x2a958906c0 1> 
        align 8 context <function_decl 0x2a959de410 end> abstract_origin 
<var_decl 0x2a959e3000>>> 
$19 = void 
(gdb) 
 
Note that the arg 1 does not have RTL yet.  We eventually die expanding that 
arg when we trigger an assert: 
 
#1  0x0000000000a4eceb in make_decl_rtl (decl=0x2a959f7270) at varasm.c:868 
868         abort (); 
(gdb) p debug_tree(decl) 
 <var_decl 0x2a959f7270 
    type <record_type 0x2a959d79c0 Iterator addressable needs-constructing 
type_1 type_5 BLK 
        size <integer_cst 0x2a95890690 constant invariant 8> 
        unit size <integer_cst 0x2a958906c0 constant invariant 1> 
        align 8 symtab 0 alias set -1 
        fields <type_decl 0x2a959e0000 Iterator type <record_type 0x2a959d79c0 
Iterator> 
            nonlocal decl_4 VOID file t.C line 12 
            align 1 context <record_type 0x2a959d79c0 Iterator> 
           > 
       needs-constructor X() X(constX&) this=(X&) n_parents=0 use_template=0 
interface-unknown 
        pointer_to_this <pointer_type 0x2a959e0340> reference_to_this 
<reference_type 0x2a959e5680> chain <type_decl 0x2a959d7b60 Iterator>> 
    addressable used ignored BLK file t.C line 22 size <integer_cst 
0x2a95890690 8> unit size <integer_cst 0x2a958906c0 1> 
    align 8 context <function_decl 0x2a959de410 end> abstract_origin <var_decl 
0x2a959e3000>> 
$31 = void 
(gdb) l 
863           || (TREE_CODE (decl) == VAR_DECL 
864               && !TREE_STATIC (decl) 
865               && !TREE_PUBLIC (decl) 
866               && !DECL_EXTERNAL (decl) 
867               && !DECL_REGISTER (decl))) 
868         abort (); 
869       /* And that we were not given a type or a label.  */ 
870       else if (TREE_CODE (decl) == TYPE_DECL 
871                || TREE_CODE (decl) == LABEL_DECL) 
872         abort (); 
(gdb) p debug_tree (decl) 
 <var_decl 0x2a959f7270 
    type <record_type 0x2a959d79c0 Iterator addressable needs-constructing 
type_1 type_5 BLK 
        size <integer_cst 0x2a95890690 constant invariant 8> 
        unit size <integer_cst 0x2a958906c0 constant invariant 1> 
        align 8 symtab 0 alias set -1 
        fields <type_decl 0x2a959e0000 Iterator type <record_type 0x2a959d79c0 
Iterator> 
            nonlocal decl_4 VOID file t.C line 12 
            align 1 context <record_type 0x2a959d79c0 Iterator> 
           > 
       needs-constructor X() X(constX&) this=(X&) n_parents=0 use_template=0 
interface-unknown 
        pointer_to_this <pointer_type 0x2a959e0340> reference_to_this 
<reference_type 0x2a959e5680> chain <type_decl 0x2a959d7b60 Iterator>> 
    addressable used ignored BLK file t.C line 22 size <integer_cst 
0x2a95890690 8> unit size <integer_cst 0x2a958906c0 1> 
    align 8 context <function_decl 0x2a959de410 end> abstract_origin <var_decl 
0x2a959e3000>> 
$36 = void 
 

-- 


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



More information about the Gcc-bugs mailing list