This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/61456] Bogus "may be used uninitialized" warning
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Jun 2014 09:49:57 +0000
- Subject: [Bug middle-end/61456] Bogus "may be used uninitialized" warning
- Auto-submitted: auto-generated
- References: <bug-61456-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61456
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm.
This is running into nonoverlapping_component_refs_of_decl_p which has
(gdb) p field1
$32 = <field_decl 0x7ffff6d7f8e8 __delta>
(gdb) p field2
$33 = <field_decl 0x7ffff6d7f720 __delta>
but they are clearly on the same offset and have the same size. They
are members of different types (but same TYPE_MAIN_VARIANT) and appearantly
the TYPE_FIELDs of the variants are not shared.
So appearantly it is not safe to drop to TYPE_MAIN_VARIANT here (and in
nonoverlapping_component_refs_p). But it's also not necessary - if the
TYPE_FILEDs are shared then the DECL_FIELD_CONTEXT of course points to the
same type already.