This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/14049] [regression tree-ssa] bad debug block info, dwarf-2, c++
- From: "mec dot gnu at mindspring dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Feb 2004 17:49:55 -0000
- Subject: [Bug debug/14049] [regression tree-ssa] bad debug block info, dwarf-2, c++
- References: <20040206163854.14049.mec.gnu@mindspring.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mec dot gnu at mindspring dot com 2004-02-06 17:49 -------
Created an attachment (id=5697)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5697&action=view)
Source code for a test case
Here is another test program for the same bug (I think it's the same bug).
The guts of the test case are:
void
do_block_tests ()
{
int cb = 12;
{
int foo;
foo = 123;
{
int foo2;
foo2 = 123;
{
int foo;
foo = 321;
}
foo2 = 0;
}
foo = 0;
}
cb = 21;
}
With both gcc HEAD and gcc tree-ssa, the dwarf-2 info looks like:
DW_TAG_subprogram do_block_tests
DW_TAG_variable cb
DW_TAG_lexical_block .LBB2 .LBE2
DW_TAG_variable foo
DW_TAG_lexical_block .LBB3 .LBE3
DW_TAG_variable foo2
DW_TAG_lexical_block .LBB4 .LBE4
DW_TAG_variable foo
The problem is that gcc tree-ssa generates bad LBB/LBE pairs that do not
include the first assignment to the local variable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14049