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

[Bug c++/26957] [4.0/4.1/4.2 regression] ICE in make_decl_rtl, at varasm.c:871



------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca  2006-03-31 15:34 -------
Subject: Re:  [4.0/4.1/4.2 regression] ICE in make_decl_rtl, at varasm.c:871

> ------- Comment #4 from danglin at gcc dot gnu dot org  2006-03-31 15:04 -------
> Breakpoint 1, make_decl_rtl (decl=0x40148880) at ../../gcc/gcc/varasm.c:968
> 968       gcc_assert (TREE_CODE (decl) != TYPE_DECL
> (gdb) list
> 963                   || TREE_PUBLIC (decl)
> 964                   || DECL_EXTERNAL (decl)
> 965                   || DECL_REGISTER (decl));
> 966
> 967       /* And that we were not given a type or a label.  */
> 968       gcc_assert (TREE_CODE (decl) != TYPE_DECL
> 969                   && TREE_CODE (decl) != LABEL_DECL);
> 970
> 971       /* For a duplicate declaration, we can be called twice on the
> 972          same DECL node.  Don't discard the RTL already made.  */
> (gdb) bt
> #0  make_decl_rtl (decl=0x40148880) at ../../gcc/gcc/varasm.c:968
> #1  0x003a6adc in init_one_libfunc (name=<value optimized out>)
>     at ../../gcc/gcc/optabs.c:5131
> #2  0x000f1768 in init_exception_processing () at ../../gcc/gcc/cp/except.c:80
> #3  0x0003878c in cxx_init_decl_processing () at ../../gcc/gcc/cp/decl.c:3250
> #4  0x000b3760 in cxx_init () at ../../gcc/gcc/cp/lex.c:386
> #5  0x0041dad4 in toplev_main (argc=<value optimized out>,
>     argv=<value optimized out>) at ../../gcc/gcc/toplev.c:1864
> #6  0x403566d8 in __libc_start_main () from /lib/libc.so.6
> #7  0x0001d190 in _start () at ../sysdeps/hppa/elf/start.S:84
> (gdb) p debug_tree (decl)
>  <function_decl 0x40148880 __gxx_personality_v0
>     type <function_type 0x400db540
>         type <integer_type 0x400d22a0 int public SI
>             size <integer_cst 0x400c22b8 constant invariant 32>
>             unit size <integer_cst 0x400c2048 constant invariant 4>
>             align 32 symtab 0 alias set -1 precision 32 min <integer_cst
> 0x400c2270 -2147483648> max <integer_cst 0x400c2288 2147483647>
>             pointer_to_this <pointer_type 0x400d2cc0>>
>         SI size <integer_cst 0x400c22b8 32> unit size <integer_cst 0x400c2048
> 4>
>         align 32 symtab 0 alias set -1>
>     public external SI file <built-in> line 0>
> $1 = void

Oops, wrong call to ame_decl_rtl.  The one causing the ICE is:

Assembling functions:
 virtual void TAO_DynCommon::insert_longdouble(LongDouble) void
TAO_DynCommon::_ZTv0_n12_N13TAO_DynCommon17insert_longdoubleE10LongDouble(LongDouble)
 Breakpoint 1, make_decl_rtl (decl=0x400cc4d0) at ../../gcc/gcc/varasm.c:957
 957       gcc_assert (TREE_CODE (decl) != PARM_DECL
 (gdb) bt
 #0  make_decl_rtl (decl=0x400cc4d0) at ../../gcc/gcc/varasm.c:957
 #1  0x00302dd4 in expand_expr_real_1 (exp=<value optimized out>,
     target=<value optimized out>, tmode=<value optimized out>,
     modifier=EXPAND_NORMAL, alt_rtl=0xc0013208) at ../../gcc/gcc/expr.c:6730
 #2  0x00308414 in expand_expr_real (exp=0x400cc4d0, target=0x40175460,
     tmode=BLKmode, modifier=EXPAND_NORMAL, alt_rtl=0xc0013208)
     at ../../gcc/gcc/expr.c:6576
 #3  0x0030dd6c in store_expr (exp=0x400cc4d0, target=0x40175460,
     call_param_p=0) at ../../gcc/gcc/expr.c:4275
 #4  0x002fb3a4 in expand_assignment (to=0x400cc9a0, from=0x400cc4d0)
     at ../../gcc/gcc/expr.c:4154
 #5  0x002ffa9c in expand_expr_real_1 (exp=<value optimized out>,
     target=<value optimized out>, tmode=<value optimized out>,
     modifier=<value optimized out>, alt_rtl=0x0) at ../../gcc/gcc/expr.c:8467
 #6  0x0030832c in expand_expr_real (exp=0x4014c550, target=0x40175460,
     tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
     at ../../gcc/gcc/expr.c:6570
 #7  0x00410f08 in expand_expr_stmt (exp=0x400cc4d0) at expr.h:494
 #8  0x00458d68 in expand_gimple_basic_block (bb=0x400cdf50)
     at ../../gcc/gcc/cfgexpand.c:1368
 #9  0x00459ec0 in tree_expand_cfg () at ../../gcc/gcc/cfgexpand.c:1627
 #10 0x00454e68 in execute_one_pass (pass=0x64ec90)
     at ../../gcc/gcc/passes.c:863
 #11 0x00455008 in execute_pass_list (pass=0x64ec90)
     at ../../gcc/gcc/passes.c:910
 #12 0x001a3750 in tree_rest_of_compilation (fndecl=0x40148700)
     at ../../gcc/gcc/tree-optimize.c:418
 #13 0x0010753c in expand_body (fn=0x40148700)
     at ../../gcc/gcc/cp/semantics.c:3012
 #14 0x000fc2f4 in use_thunk (thunk_fndecl=0x40175460,
     emit_p=<value optimized out>) at ../../gcc/gcc/cp/method.c:520
 #15 0x001074c4 in expand_body (fn=0x40172e00)
     at ../../gcc/gcc/cp/semantics.c:2965
 #16 0x00495cf0 in cgraph_expand_function (node=0x40172f00)
     at ../../gcc/gcc/cgraphunit.c:1102
 #17 0x00498994 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1167
 #18 0x000a7390 in cp_finish_file () at ../../gcc/gcc/cp/decl2.c:3147
 #19 0x00172284 in c_common_parse_file (set_yydebug=<value optimized out>)
     at ../../gcc/gcc/c-opts.c:1165
 #20 0x0041dbdc in toplev_main (argc=<value optimized out>,
     argv=<value optimized out>) at ../../gcc/gcc/toplev.c:999
 #21 0x403566d8 in __libc_start_main () from /lib/libc.so.6
 #22 0x0001d190 in _start () at ../sysdeps/hppa/elf/start.S:84
(gdb) p debug_tree (decl)
 <var_decl 0x400cc4d0 value___0
    type <record_type 0x40177000 LongDouble type_1 type_5 BLK
        size <integer_cst 0x400c2528 constant invariant 128>
        unit size <integer_cst 0x400c2540 constant invariant 16>
        align 8 symtab 0 alias set -1
        fields <field_decl 0x40177120 ld type <array_type 0x401770c0>
             nonlocal decl_3 BLK file TAO.cc line 2 size <integer_cst
0x400c2528 128> unit size <integer_cst 0x400c2540 16>
             align 8 offset_align 64
             offset <integer_cst 0x400c2060 constant invariant 0>
             bit offset <integer_cst 0x400c27f8 constant invariant 0> context
<record_type 0x40177000 LongDouble> chain <type_decl 0x4014a9c0 LongDouble>>
         X() X(constX&) this=(X&) n_parents=0 use_template=0 interface-unknown
         pointer_to_this <pointer_type 0x40177ea0> chain <type_decl 0x4014a958
LongDouble>>
    used BLK file TAO.cc line 13 size <integer_cst 0x400c2528 128> unit size
<integer_cst 0x400c2540 16>
    align 8 context <function_decl 0x40172e00 insert_longdouble>>
(gdb) step
951     {
(gdb)
957       gcc_assert (TREE_CODE (decl) != PARM_DECL
(gdb)
961       gcc_assert (TREE_CODE (decl) != VAR_DECL
(gdb)

TAO.cc:9: internal compiler error: in make_decl_rtl, at varasm.c:965

Dave


-- 


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


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