re PR debug/82718 (Bad DWARF5 .debug_loclists generation)
authorJakub Jelinek <jakub@redhat.com>
Tue, 21 Nov 2017 07:59:03 +0000 (08:59 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 21 Nov 2017 07:59:03 +0000 (08:59 +0100)
commit8b87e0d12576318e2ae02284e767b4d083cc4149
treecb8105420b51b50135fc21ae493584d22fba72ab
parent83087d6521689c6200065537640b953972fbd76b
re PR debug/82718 (Bad DWARF5 .debug_loclists generation)

PR debug/82718
* dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
set in_cold_section_p to the partition containing loc_list->first.
When seeing loc_list->last_before_switch node, update secname and
perform range_across_switch second partition handling only after that.

* gcc.dg/debug/dwarf2/pr82718-1.c: New test.
* gcc.dg/debug/dwarf2/pr82718-2.c: New test.

From-SVN: r254989
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/dwarf2/pr82718-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/pr82718-2.c [new file with mode: 0644]