re PR debug/56154 (Bad .debug_loc generated for some code)
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Feb 2013 14:48:39 +0000 (15:48 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 7 Feb 2013 14:48:39 +0000 (15:48 +0100)
commitf980dfdb8ceb8ddd2683787120b800c8584121ee
treea4ce57d3fa3394419c28e38309ee4f749ee5cf2f
parentfcf0430bda26a50f1279cb09e8bd8ecfdfa687d6
re PR debug/56154 (Bad .debug_loc generated for some code)

PR debug/56154
* dwarf2out.c (dwarf2_debug_hooks): Set end_function hook to
dwarf2out_end_function.
(in_first_function_p, maybe_at_text_label_p,
first_loclabel_num_not_at_text_label): New variables.
(dwarf2out_var_location): In the first function find out
lowest loclabel_num N where .LVLN is known not to be equal
to .Ltext0.
(find_empty_loc_ranges_at_text_label, dwarf2out_end_function): New
functions.

* gcc.dg/guality/pr56154-1.c: New test.
* gcc.dg/guality/pr56154-2.c: New test.
* gcc.dg/guality/pr56154-3.c: New test.
* gcc.dg/guality/pr56154-4.c: New test.
* gcc.dg/guality/pr56154-aux.c: New file.

From-SVN: r195850
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/pr56154-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/guality/pr56154-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/guality/pr56154-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/guality/pr56154-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/guality/pr56154-aux.c [new file with mode: 0644]