diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2011-11-10 15:28:04 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-11-10 15:28:04 -0500 |
commit | c68b1bc7eb13d1db7fc7b61a3601cac9cb75bcbe (patch) | |
tree | 52fffe30d4f92cf23695b52077e0393f56988f48 | |
parent | 033ba5bf9cbcdfb60cccbf61796b19b792de0ac9 (diff) | |
download | gcc-c68b1bc7eb13d1db7fc7b61a3601cac9cb75bcbe.zip gcc-c68b1bc7eb13d1db7fc7b61a3601cac9cb75bcbe.tar.gz gcc-c68b1bc7eb13d1db7fc7b61a3601cac9cb75bcbe.tar.bz2 |
re PR debug/50983 (incorrect DW_LNS_negate_stmt)
PR debug/50983
* dwarf2out.c (set_cur_line_info_table): Restore the last is_stmt
value in the current line table.
From-SVN: r181269
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c | 20 |
4 files changed, 35 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 92cb202..9c7a2f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-11-10 Roberto Agostino Vitillo <ravitillo@lbl.gov> + + PR debug/50983 + * dwarf2out.c (set_cur_line_info_table): Restore the last is_stmt + value in the current line table. + 2011-11-10 Nathan Sidwell <nathan@acm.org> * gcov.c (struct function_info): Make src an index, not a pointer. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 39be9a1..7b5930e 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -20371,6 +20371,10 @@ set_cur_line_info_table (section *sec) VEC_safe_push (dw_line_info_table_p, gc, separate_line_info, table); } + if (DWARF2_ASM_LINE_DEBUG_INFO) + table->is_stmt = (cur_line_info_table + ? cur_line_info_table->is_stmt + : DWARF_LINE_DEFAULT_IS_STMT_START); cur_line_info_table = table; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e988797..f3315cb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-11-10 Jason Merrill <jason@redhat.com> + + PR debug/50983 + * gcc.dg/debug/dwarf2/asm-line1.c: New. + 2011-11-10 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/atomic6_1.adb: New test. diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c new file mode 100644 index 0000000..1d2e148 --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c @@ -0,0 +1,20 @@ +/* PR debug/50983 */ +/* { dg-do compile { target *-*-linux-gnu } } */ +/* { dg-options "-O0 -gdwarf-2" } */ +/* { dg-final { scan-assembler "is_stmt 1" } } */ + +int i; +void f() __attribute ((section ("foo"))); +void f() { if (i) ++i; else --i; } + +void fun() +{ + return; +} + +int main() +{ + f(); + fun(); + return 0; +} |