This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70594] [6 Regression] -fcompare-debug failure
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Apr 2016 13:58:07 +0000
- Subject: [Bug c++/70594] [6 Regression] -fcompare-debug failure
- Auto-submitted: auto-generated
- References: <bug-70594-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70594
--- Comment #46 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, it seems the ctor BLOCKs are preserved, but others are removed.
So, with -g we get:
(gdb) p debug_generic_stmt (block_ultimate_origin ($29))
BLOCK #0
SUPERCONTEXT: assign
(gdb) p debug_generic_stmt (block_ultimate_origin ($29->block.supercontext))
assign
(gdb) p debug_generic_stmt (block_ultimate_origin
($29->block.supercontext->block.supercontext))
_M_set_length
(gdb) p debug_generic_stmt (block_ultimate_origin
($29->block.supercontext->block.supercontext->block.supercontext))
BLOCK #0
SUPERCONTEXT: basic_string
(gdb) p debug_generic_stmt (block_ultimate_origin
($29->block.supercontext->block.supercontext->block.supercontext->block.supercontext))
basic_string
and assign and _M_set_length are FUNCTION_DECLs which aren't cdtors.
while with -g0 we get for the same stmt:
(gdb) p debug_generic_stmt (block_ultimate_origin ($33))
BLOCK #0
SUPERCONTEXT: assign
(gdb) p debug_generic_stmt (block_ultimate_origin ($33->block.supercontext))
BLOCK #0
SUPERCONTEXT: basic_string
(gdb) p debug_generic_stmt (block_ultimate_origin
($33->block.supercontext->block.supercontext))
basic_string
$29 and $33 above are gimple_block (stmt).
This means for -g we have more rich BLOCK tree, with extra 2 BLOCKs in between,
which have sadly FUNCTION_DECL block_ultimate_origin.