------- Comment #14 from steven at gcc dot gnu dot org  2009-04-12 23:52 -------
Ah, how subtle.

(gdb) p MEM_ATTRS(x)
$25 = (mem_attrs *) 0x7f20d1ad0440
(gdb) p MEM_ATTRS(y)
$26 = (mem_attrs *) 0x7f20d1ad71a0
(gdb) p MEM_ATTRS(*x)
$27 = (mem_attrs *) 0x7f20d1ad0440
(gdb) p MEM_ATTRS(*y)
$28 = (mem_attrs *) 0x7f20d1ad71a0
(gdb) p MEM_ATTRS(x)
$29 = (mem_attrs *) 0x7f20d1ad0440
(gdb) p MEM_ATTRS(y)
$30 = (mem_attrs *) 0x7f20d1ad71a0
(gdb) p *MEM_ATTRS(x)
$31 = {expr = 0x7f20d406cfa0, offset = 0x7f20d9e05450, size = 0x7f20d9e05490,
alias = 32, 
  align = 32}
(gdb) p *MEM_ATTRS(y)
$32 = {expr = 0x7f20d4093190, offset = 0x7f20d9e05450, size = 0x7f20d9e05490,
alias = 32, 
  align = 32}
(gdb) p debug_tree(MEM_ATTRS(x)->expr)
 <component_ref 0x7f20d406cfa0
    type <pointer_type 0x7f20d6bd96c0
        type <record_type 0x7f20d6bd8d80 Data type_5 BLK
            size <integer_cst 0x7f20d7fd4510 constant 160>
            unit size <integer_cst 0x7f20d7fd44b0 constant 20>
            align 32 symtab 0 alias set 87 canonical type 0x7f20d6bd8d80 fields
<field_decl 0x7f20d6b58640 ref> context <record_type 0x7f20d7710840 QString>
            full-name "struct QString::Data"
            X() X(constX&) this=(X&) n_parents=0 use_template=0
interface-unknown
            pointer_to_this <pointer_type 0x7f20d6bd96c0> chain <type_decl
0x7f20d6bd8e40 Data>>
        sizes-gimplified unsigned SI
        size <integer_cst 0x7f20d9e00a50 constant 32>
        unit size <integer_cst 0x7f20d9e006c0 constant 4>
        align 32 symtab 0 alias set 32 canonical type 0x7f20d6bd96c0
        pointer_to_this <pointer_type 0x7f20d6a15d80> reference_to_this
<reference_type 0x7f20d6be3a80>>

    arg 0 <var_decl 0x7f20d4073be0 cpy
        type <record_type 0x7f20d74f5b40 QString readonly sizes-gimplified
addressable needs-constructing type_1 type_4 type_5 type_6 BLK size
<integer_cst 0x7f20d9e00a50 32> unit size <integer_cst 0x7f20d9e006c0 4>
            align 32 symtab 0 alias set -1 canonical type 0x7f20d74f5b40
            attributes <tree_list 0x7f20d6b64b10
                purpose <identifier_node 0x7f20d7fd2f00 visibility
                bindings <(nil)>
                local bindings <(nil)>>
                value <tree_list 0x7f20d6b64ae0
                    value <string_cst 0x7f20d6b64ab0 type <array_type
0x7f20d7710b40>
                        readonly constant static "default\000">>> fields
<const_decl 0x7f20d6b57280 SectionDefault>
            full-name "const class QString"
            needs-constructor needs-destructor X() X(constX&) this=(X&)
n_parents=0 use_template=0 interface-unknown
            pointer_to_this <pointer_type 0x7f20d6b68f00> reference_to_this
<reference_type 0x7f20d74f5c00>>
        addressable used tree_1 tree_2 tree_3 in_system_header decl_1 decl_5
BLK file /usr/include/QtCore/qlist.h line 420 col 21 size <integer_cst
0x7f20d9e00a50 32> unit size <integer_cst 0x7f20d9e006c0 4>
        align 32 context <function_decl 0x7f20d5f90800 __comp_ctor >
abstract_origin <var_decl 0x7f20d5553be0 cpy>
        (mem/s/c:BLK (plus:SI (reg/f:SI 20 frame)
        (const_int -3828 [0xfffffffffffff10c])) [31 cpy+0 S4 A32])>
    arg 1 <field_decl 0x7f20d6b58e60 d type <pointer_type 0x7f20d6bd96c0>
        used private unsigned nonlocal decl_3 SI file
/usr/include/QtCore/qstring.h line 574 col 11 size <integer_cst 0x7f20d9e00a50
32> unit size <integer_cst 0x7f20d9e006c0 4>
        align 32 offset_align 128
        offset <integer_cst 0x7f20d9e006f0 constant 0>
        bit offset <integer_cst 0x7f20d9e232d0 constant 0> context <record_type
0x7f20d7710840 QString>
        chain <var_decl 0x7f20d6b58f00 codecForCStrings type <pointer_type
0x7f20d6bd9900>
            used public private static unsigned external nonlocal
in_system_header decl_3 decl_5 decl_6 SI file /usr/include/QtCore/qstring.h
line 577 col 24 size <integer_cst 0x7f20d9e00a50 32> unit size <integer_cst
0x7f20d9e006c0 4>
            align 32 context <record_type 0x7f20d7710840 QString>
            chain <type_decl 0x7f20d6b65900 QString>>>
    /usr/include/QtCore/qstring.h:670:58>
$33 = void
(gdb) p debug_tree(MEM_ATTRS(y)->expr)
 <component_ref 0x7f20d4093190
    type <pointer_type 0x7f20d6bd96c0
        type <record_type 0x7f20d6bd8d80 Data type_5 BLK
            size <integer_cst 0x7f20d7fd4510 constant 160>
            unit size <integer_cst 0x7f20d7fd44b0 constant 20>
            align 32 symtab 0 alias set 87 canonical type 0x7f20d6bd8d80 fields
<field_decl 0x7f20d6b58640 ref> context <record_type 0x7f20d7710840 QString>
            full-name "struct QString::Data"
            X() X(constX&) this=(X&) n_parents=0 use_template=0
interface-unknown
            pointer_to_this <pointer_type 0x7f20d6bd96c0> chain <type_decl
0x7f20d6bd8e40 Data>>
        sizes-gimplified unsigned SI
        size <integer_cst 0x7f20d9e00a50 constant 32>
        unit size <integer_cst 0x7f20d9e006c0 constant 4>
        align 32 symtab 0 alias set 32 canonical type 0x7f20d6bd96c0
        pointer_to_this <pointer_type 0x7f20d6a15d80> reference_to_this
<reference_type 0x7f20d6be3a80>>

    arg 0 <var_decl 0x7f20d408e320 cpy
        type <record_type 0x7f20d74f5b40 QString readonly sizes-gimplified
addressable needs-constructing type_1 type_4 type_5 type_6 BLK size
<integer_cst 0x7f20d9e00a50 32> unit size <integer_cst 0x7f20d9e006c0 4>
            align 32 symtab 0 alias set -1 canonical type 0x7f20d74f5b40
            attributes <tree_list 0x7f20d6b64b10
                purpose <identifier_node 0x7f20d7fd2f00 visibility
                bindings <(nil)>
                local bindings <(nil)>>
                value <tree_list 0x7f20d6b64ae0
                    value <string_cst 0x7f20d6b64ab0 type <array_type
0x7f20d7710b40>
                        readonly constant static "default\000">>> fields
<const_decl 0x7f20d6b57280 SectionDefault>
            full-name "const class QString"
            needs-constructor needs-destructor X() X(constX&) this=(X&)
n_parents=0 use_template=0 interface-unknown
            pointer_to_this <pointer_type 0x7f20d6b68f00> reference_to_this
<reference_type 0x7f20d74f5c00>>
        addressable used tree_1 tree_2 tree_3 in_system_header decl_1 decl_5
BLK file /usr/include/QtCore/qlist.h line 420 col 21 size <integer_cst
0x7f20d9e00a50 32> unit size <integer_cst 0x7f20d9e006c0 4>
        align 32 context <function_decl 0x7f20d5f90800 __comp_ctor >
abstract_origin <var_decl 0x7f20d5553be0 cpy>
        (mem/s/c:BLK (plus:SI (reg/f:SI 20 frame)
        (const_int -3828 [0xfffffffffffff10c])) [31 cpy+0 S4 A32])>
    arg 1 <field_decl 0x7f20d6b58e60 d type <pointer_type 0x7f20d6bd96c0>
        used private unsigned nonlocal decl_3 SI file
/usr/include/QtCore/qstring.h line 574 col 11 size <integer_cst 0x7f20d9e00a50
32> unit size <integer_cst 0x7f20d9e006c0 4>
        align 32 offset_align 128
        offset <integer_cst 0x7f20d9e006f0 constant 0>
        bit offset <integer_cst 0x7f20d9e232d0 constant 0> context <record_type
0x7f20d7710840 QString>
        chain <var_decl 0x7f20d6b58f00 codecForCStrings type <pointer_type
0x7f20d6bd9900>
            used public private static unsigned external nonlocal
in_system_header decl_3 decl_5 decl_6 SI file /usr/include/QtCore/qstring.h
line 577 col 24 size <integer_cst 0x7f20d9e00a50 32> unit size <integer_cst
0x7f20d9e006c0 4>
            align 32 context <record_type 0x7f20d7710840 QString>
            chain <type_decl 0x7f20d6b65900 QString>>>
    /usr/include/QtCore/qstring.h:670:58>
$34 = void
(gdb) 

So the expressions look exactly the same when printed ("cpy.d") but they are
actually not the same variable.  OK.  False alarm.  Pfew...


-- 


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

Reply via email to