This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/14049] [regression tree-ssa] bad debug block info, dwarf-2, c++


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]