re PR debug/55541 (unable to see local variables due extra lexical block was generated)
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Feb 2015 18:09:59 +0000 (19:09 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 12 Feb 2015 18:09:59 +0000 (19:09 +0100)
commit12d0d3581b0acf77d6cb57b6e77eaf92e0413b78
tree643380c28cfaa4e5d03935806d8323e6c7214b68
parent40595b8e01bd43d5c58b5fbf0abed1f30419aed3
re PR debug/55541 (unable to see local variables due extra lexical block was generated)

PR debug/55541
* cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
* decl.c (poplevel): If functionbody, try not to create an extra
BLOCK for function body and use subblocks as that, if it is non-NULL
and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
(outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.

* g++.dg/debug/dwarf2/localclass3.C: Adjust for the extraneous
DW_TAG_lexical_block removal.
* g++.dg/debug/dwarf2/redeclaration-1.C: Likewise.
* g++.dg/guality/pr55541.C: New test.

From-SVN: r220650
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/localclass3.C
gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C
gcc/testsuite/g++.dg/guality/pr55541.C [new file with mode: 0644]