[Bug lto/44894] bogus warning: Use of type Âstruct nsNodeInfoManager with two mismatching declarations at field ÂmDocument [enabled by default]
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Jul 10 11:21:00 GMT 2010
------- Comment #5 from rguenth at gcc dot gnu dot org 2010-07-10 11:21 -------
Somewhere down in type
0x7ffff57497e0 struct nsRefreshDriver
0x7ffff5964348 struct nsRefreshDriver
(gdb) call debug_type_differences (0x7ffff57497e0, 0x7ffff5964348)
Hashes differ.
Field types not compatible.
type 0x7ffff59fb690 struct nsPresContext *
type 0x7ffff5af9d20 struct nsPresContext *
field 0x7ffff574b688 mPresContext
field 0x7ffff5941ab0 mPresContext
Field types not compatible.
type 0x7ffff574c150 struct nsTObserverArray[3]
type 0x7ffff5964dc8 struct nsTObserverArray[3]
field 0x7ffff574b7b8 mObservers
field 0x7ffff5941be0 mObservers
(gdb) call debug_type_differences (0x7ffff574c150, 0x7ffff5964dc8)
Hashes differ.
Because the array types have different size:
<array_type 0x7ffff574c150
type <record_type 0x7ffff574c0a8 nsTObserverArray addressable
needs-constructing BLK
size <integer_cst 0x7ffff7ed3938 constant 128>
unit size <integer_cst 0x7ffff7ed3960 constant 16>
align 64 symtab 0 alias set -1 canonical type 0x7ffff574c0a8
fields <field_decl 0x7ffff574b850 D.11101 type <record_type
0x7ffff5749e70 nsAutoTObserverArray>
ignored BLK file tc/nsCopySupport.3.ii line 2745 col 25 size
<integer_cst 0x7ffff7ed3938 128> unit size <integer_cst 0x7ffff7ed3960 16>
align 64 offset_align 128
offset <integer_cst 0x7ffff7ed3410 constant 0>
bit offset <integer_cst 0x7ffff7ed3b18 constant 0> context
<record_type 0x7ffff574c0a8 nsTObserverArray>>>
needs-constructing BLK
size <integer_cst 0x7ffff5b0e000 type <integer_type 0x7ffff7ee50a8
bit_size_type> constant 384>
unit size <integer_cst 0x7ffff5af80f0 type <integer_type 0x7ffff7ee5000>
constant 48>
align 64 symtab 0 alias set -1 canonical type 0x7ffff574c150
domain <integer_type 0x7ffff59f1930
type <integer_type 0x7ffff7ee5000 public unsigned sizetype DI
size <integer_cst 0x7ffff7ed37a8 constant 64>
unit size <integer_cst 0x7ffff7ed37d0 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff7ee5000
precision 64 min <integer_cst 0x7ffff7ed37f8 0> max <integer_cst 0x7ffff7ed39b0
-1>>
DI size <integer_cst 0x7ffff7ed37a8 64> unit size <integer_cst
0x7ffff7ed37d0 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff59f1930 precision
64 min <integer_cst 0x7ffff7ed3410 0> max <integer_cst 0x7ffff7ed3618 2>>>
<array_type 0x7ffff5964dc8
type <record_type 0x7ffff5b283f0 nsTObserverArray addressable
needs-constructing BLK
size <integer_cst 0x7ffff7ed3f28 constant 192>
unit size <integer_cst 0x7ffff7ed3ed8 constant 24>
align 64 symtab 0 alias set -1 canonical type 0x7ffff5b283f0
fields <field_decl 0x7ffff5b1cd10 D.2705 type <record_type
0x7ffff5b28498 nsAutoTObserverArray>
ignored BLK file tc/nsContentUtils.3.3.ii line 3624 col 25 size
<integer_cst 0x7ffff7ed3f28 192> unit size <integer_cst 0x7ffff7ed3ed8 24>
align 64 offset_align 128
offset <integer_cst 0x7ffff7ed3410 constant 0>
bit offset <integer_cst 0x7ffff7ed3b18 constant 0> context
<record_type 0x7ffff5b283f0 nsTObserverArray>>>
needs-constructing BLK
size <integer_cst 0x7ffff5b0cf78 type <integer_type 0x7ffff7ee50a8
bit_size_type> constant 576>
unit size <integer_cst 0x7ffff5b0e028 type <integer_type 0x7ffff7ee5000>
constant 72>
align 64 symtab 0 alias set -1 canonical type 0x7ffff5964dc8
domain <integer_type 0x7ffff59f1930
type <integer_type 0x7ffff7ee5000 public unsigned sizetype DI
size <integer_cst 0x7ffff7ed37a8 constant 64>
unit size <integer_cst 0x7ffff7ed37d0 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff7ee5000
precision 64 min <integer_cst 0x7ffff7ed37f8 0> max <integer_cst 0x7ffff7ed39b0
-1>>
DI size <integer_cst 0x7ffff7ed37a8 64> unit size <integer_cst
0x7ffff7ed37d0 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff59f1930 precision
64 min <integer_cst 0x7ffff7ed3410 0> max <integer_cst 0x7ffff7ed3618 2>>>
because the array element types differ:
(gdb) call debug_type_differences (0x7ffff574c0a8, 0x7ffff5b283f0)
Hashes differ.
Field types not compatible.
type 0x7ffff5749e70 struct nsAutoTObserverArray
type 0x7ffff5b28498 struct nsAutoTObserverArray
field 0x7ffff574b850 D.11101
field 0x7ffff5b1cd10 D.2705
(gdb) call debug_type_differences (0x7ffff5749e70, 0x7ffff5b28498)
Hashes differ.
Field types not compatible.
type 0x7ffff5749f18 struct nsAutoTArray
type 0x7ffff5b28930 struct nsAutoTArray
field 0x7ffff574b980 mArray
field 0x7ffff5b2a098 mArray
(gdb) call debug_type_differences (0x7ffff5749f18, 0x7ffff5b28930)
Hashes differ.
Different number of fields.
Type decls:
<type_decl 0x7ffff5933e60 nsAutoTArray
type <record_type 0x7ffff5749f18 nsAutoTArray addressable
needs-constructing BLK
size <integer_cst 0x7ffff7ed37a8 constant 64>
unit size <integer_cst 0x7ffff7ed37d0 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff5749f18
fields <field_decl 0x7ffff574ba18 D.11104 type <record_type
0x7ffff5bc03f0 nsTArray>
ignored BLK file tc/nsCopySupport.3.ii line 2126 col 25 size
<integer_cst 0x7ffff7ed37a8 64> unit size <integer_cst 0x7ffff7ed37d0 8>
align 64 offset_align 128
offset <integer_cst 0x7ffff7ed3410 constant 0>
bit offset <integer_cst 0x7ffff7ed3b18 constant 0> context
<record_type 0x7ffff5749f18 nsAutoTArray>>>
public BLK file tc/nsCopySupport.3.ii line 2106 col 37
align 8>
and
<type_decl 0x7ffff5b257e8 nsAutoTArray
type <record_type 0x7ffff5b28930 nsAutoTArray addressable
needs-constructing BLK
size <integer_cst 0x7ffff7ed3938 constant 128>
unit size <integer_cst 0x7ffff7ed3960 constant 16>
align 64 symtab 0 alias set -1 canonical type 0x7ffff5b28930
fields <field_decl 0x7ffff5b2a130 D.2715 type <record_type
0x7ffff5bc03f0 nsTArray>
ignored BLK file tc/nsContentUtils.3.3.ii line 1757 col 37
size <integer_cst 0x7ffff7ed37a8 constant 64>
unit size <integer_cst 0x7ffff7ed37d0 constant 8>
align 64 offset_align 128
offset <integer_cst 0x7ffff7ed3410 constant 0>
bit offset <integer_cst 0x7ffff7ed3b18 constant 0> context
<record_type 0x7ffff5b28930 nsAutoTArray> chain <field_decl 0x7ffff5b2a4c0
D.2725>>>
public BLK file tc/nsContentUtils.3.3.ii line 1757 col 37
align 8>
One type misses the protected union member (both sources are identical
though):
template<class E, PRUint32 N> class nsAutoTArray : public nsTArray<E> {
public:
typedef nsTArray<E> base_type;
typedef typename base_type::Header Header;
typedef typename base_type::elem_type elem_type;
nsAutoTArray() {
base_type::mHdr = reinterpret_cast<Header*>(&mAutoBuf);
base_type::mHdr->mLength = 0;
base_type::mHdr->mCapacity = N;
base_type::mHdr->mIsAutoArray = 1;
do {
}
while (0) ;
}
protected:
union {
char mAutoBuf[sizeof(Header) + N * sizeof(elem_type)];
PRUint64 dummy;
};
};
One source misses the specialization for N == 0 (maybe an error of my
reduction though).
template<class E> class nsAutoTArray<E, 0> : public nsTArray<E> {
public:
nsAutoTArray() {
}
};
most definitely. :/
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44894
More information about the Gcc-bugs
mailing list