diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-12-23 17:54:35 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-12-23 17:54:35 +0100 |
commit | 374b9cb810f4c44bd7e66078694dcbeb3d4b40cd (patch) | |
tree | b8dcdb87793bd7954d5139a8c2bbecdd7ba0fc13 /gcc/testsuite/gcc.dg | |
parent | 83c3a2d826778223e827ab541ada1c3ffde04034 (diff) | |
download | gcc-374b9cb810f4c44bd7e66078694dcbeb3d4b40cd.zip gcc-374b9cb810f4c44bd7e66078694dcbeb3d4b40cd.tar.gz gcc-374b9cb810f4c44bd7e66078694dcbeb3d4b40cd.tar.bz2 |
re PR debug/42454 (debug_ranges table contains empty range for unused .text section with -ffunction-sections)
PR debug/42454
* dwarf2out.c (add_ranges_by_labels_to_AT_range_list): New function.
(dwarf2out_finish): Call add_ranges_by_labels_to_AT_range_list.
* gcc.dg/debug/dwarf2/aranges-fnsec-1.c: Add check for .debug_ranges.
Co-Authored-By: Cary Coutant <ccoutant@google.com>
From-SVN: r155429
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c index 8bd34b2..124e28e 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c @@ -1,9 +1,11 @@ -/* Test that .debug_aranges does not have an entry for the text - section if nothing went in there. */ +/* Test that .debug_aranges and .debug_ranges do not have an entry for the + text section if nothing went in there. */ /* Origin: Joseph Myers <joseph@codesourcery.com> */ /* { dg-do compile } */ -/* { dg-options "-gdwarf-2 -ffunction-sections -w" } */ +/* { dg-options "-gdwarf-2 -ffunction-sections -w -dA" } */ /* { dg-final { scan-assembler-not "\\.Letext0-\\.Ltext0" } } */ +/* { dg-final { scan-assembler-not "\\.Ltext0\[^\n\r\]*Offset 0x0" } } */ +/* { dg-final { scan-assembler "DW_AT_ranges" } } */ int f (void) |