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 tree-optimization/8781] Pessimization of C++ (functional) code



------- Comment #20 from rguenth at gcc dot gnu dot org  2006-04-05 16:05 -------
Because they are not the same:

(gdb) call debug_generic_expr(0xb7e31c94)
struct noop_t<int (*)()>D.2008
(gdb) call debug_generic_expr(0xb7e3505c)
struct noop_t<int (*)()>D.2008

generated by

#0  build1_stat (code=NOP_EXPR, type=0xb7e3505c, node=0xb7d843c8)
    at /space/rguenther/src/svn/gcc/gcc/tree.c:2779
#1  0x085440ad in fold_build1_stat (code=NOP_EXPR, type=0xb7e3505c, 
    op0=0xb7d843c8) at /space/rguenther/src/svn/gcc/gcc/fold-const.c:11099
#2  0x084eaf25 in fold_convert (type=0xb7e3505c, arg=0xb7d843c8)
    at /space/rguenther/src/svn/gcc/gcc/fold-const.c:1996
#3  0x0828659b in setup_one_parameter (id=0xbfffeb54, p=0xb7e38000, 
    value=0xb7d843c8, fn=0xb7e37100, bb=0xb7e400a0, vars=0xbfffe924)
    at /space/rguenther/src/svn/gcc/gcc/tree-inline.c:1069
#4  0x0828692e in initialize_inlined_parameters (id=0xbfffeb54, 
    args=0xb7e36468, static_chain=0x0, fn=0xb7e37100, bb=0xb7e400a0)
    at /space/rguenther/src/svn/gcc/gcc/tree-inline.c:1125
#5  0x08289168 in expand_call_inline (bb=0xb7e400a0, stmt=0xb7d7f1b0, 
    tp=0xb7d7f1d0, data=0xbfffeb54)
(gdb) call cxx_types_compatible_p (0xb7e31c94, 0xb7e3505c)
$1 = 1

(gdb) call debug_tree(0xb7e31c94)
 <record_type 0xb7e31c94 noop_t<int (*)()> needs-constructing type_1 type_5
type_6 SI
    size <integer_cst 0xb7d773d8 type <integer_type 0xb7d8905c bit_size_type>
constant invariant 32>
    unit size <integer_cst 0xb7d77168 type <integer_type 0xb7d89000 unsigned
int> constant invariant 4>
    align 32 symtab 0 alias set -1
    fields <field_decl 0xb7e31e60 pred
        type <reference_type 0xb7e31ebc type <pointer_type 0xb7e31da8>
            unsigned SI size <integer_cst 0xb7d773d8 32> unit size <integer_cst
0xb7d77168 4>
            align 32 symtab 0 alias set -1>
        readonly used private unsigned nonlocal decl_3 SI file t.C line 5 size
<integer_cst 0xb7d773d8 32> unit size <integer_cst 0xb7d77168 4>
        align 32 offset_align 128
        offset <integer_cst 0xb7d77180 constant invariant 0>
        bit offset <integer_cst 0xb7d77948 constant invariant 0> context
<record_type 0xb7e31c94 noop_t<int (*)()>>
        chain <type_decl 0xb7dfff08 noop_t type <record_type 0xb7e31c94
noop_t<int (*)()>>
            external nonlocal suppress-debug decl_4 VOID file t.C line 4
            align 8 context <record_type 0xb7e31c94 noop_t<int (*)()>>
           >>
   needs-constructor X(constX&) this=(X&) n_parents=0 use_template=1
interface-unknown
    pointer_to_this <pointer_type 0xb7e31f18> chain <type_decl 0xb7dffea0
noop_t<int (*)()>>>

(gdb) call debug_tree(0xb7e3505c)
 <record_type 0xb7e3505c noop_t<int (*)()> readonly needs-constructing type_1
type_5 SI
    size <integer_cst 0xb7d773d8 type <integer_type 0xb7d8905c bit_size_type>
constant invariant 32>
    unit size <integer_cst 0xb7d77168 type <integer_type 0xb7d89000 unsigned
int> constant invariant 4>
    align 32 symtab 0 alias set -1
    fields <field_decl 0xb7e31e60 pred
        type <reference_type 0xb7e31ebc type <pointer_type 0xb7e31da8>
            unsigned SI size <integer_cst 0xb7d773d8 32> unit size <integer_cst
0xb7d77168 4>
            align 32 symtab 0 alias set -1>
        readonly used private unsigned nonlocal decl_3 SI file t.C line 5 size
<integer_cst 0xb7d773d8 32> unit size <integer_cst 0xb7d77168 4>
        align 32 offset_align 128
        offset <integer_cst 0xb7d77180 constant invariant 0>
        bit offset <integer_cst 0xb7d77948 constant invariant 0> context
<record_type 0xb7e31c94 noop_t<int (*)()>>
        chain <type_decl 0xb7dfff08 noop_t type <record_type 0xb7e31c94
noop_t<int (*)()>>
            external nonlocal suppress-debug decl_4 VOID file t.C line 4
            align 8 context <record_type 0xb7e31c94 noop_t<int (*)()>>
           >>
   needs-constructor X(constX&) this=(X&) n_parents=0 use_template=1
interface-unknown
    pointer_to_this <pointer_type 0xb7e350b8> reference_to_this <reference_type
0xb7e353f4>>


-- 


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


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