From ca506be640b2b836c293450023e26ace0a0b4ea3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Carlos=20S=C3=A1nchez=20de=20La=20Lama?= Date: Thu, 9 Jul 2015 03:49:12 +0000 Subject: [PATCH] *.C: generate dwarf-2 debug information even when dwarf-2 is not the default. * g++.dg/debug/dwarf2/*.C: generate dwarf-2 debug information even when dwarf-2 is not the default. From-SVN: r225598 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/debug/dwarf2/accessibility1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/auto1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/block.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/enum1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp98.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/localclass3.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/nested-1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-10.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-8.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/typedef3.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C | 2 +- 56 files changed, 60 insertions(+), 55 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 37f3724a527..092f4c7ff10 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-07-08 Carlos Sánchez de La Lama + + * g++.dg/debug/dwarf2/*.C: generate dwarf-2 debug information + even when dwarf-2 is not the default. + 2015-07-08 Jeff Law PR testsuite/66796 diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/accessibility1.C b/gcc/testsuite/g++.dg/debug/dwarf2/accessibility1.C index 4992f41913f..3311e738467 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/accessibility1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/accessibility1.C @@ -1,6 +1,6 @@ // PR debug/44668 // { dg-do compile } -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } struct C { diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C b/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C index c04e923d8b6..5daf3cd5c87 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C @@ -1,6 +1,6 @@ // PR c++/53756 // { dg-do compile { target c++14 } } -// { dg-options "-g -dA -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-debug-types-section" } // We're looking for something like // .uleb128 0x3 # (DIE (0x33) DW_TAG_subprogram) diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/block.C b/gcc/testsuite/g++.dg/debug/dwarf2/block.C index 176823f237e..584d723b771 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/block.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/block.C @@ -1,6 +1,6 @@ // Compiler should not generate too many lexical blocks for this function. // { dg-do compile { target { i?86-*-* x86_64-*-* } } } -// { dg-options "-O0 -fno-exceptions -g -dA" } +// { dg-options "-O0 -fno-exceptions -gdwarf-2 -dA" } union UElement { void* pointer; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C index bfa5d9292f4..c0d3d225187 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C @@ -1,5 +1,5 @@ // origin PR debug/49047 -// { dg-options "-g -dA -fno-merge-debug-strings" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } // { dg-do compile } struct K diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C b/gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C index 0fcd08ea6f9..d895e78e608 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C @@ -5,7 +5,7 @@ // FE generated debug info, without losing generality, only x86 // assembly is scanned in this test. // { dg-do compile { target { i?86-*-* x86_64-*-* } } } -// { dg-options "-O2 -fno-exceptions -g -dA" } +// { dg-options "-O2 -fno-exceptions -gdwarf-2 -dA" } struct t { t (); diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/enum1.C b/gcc/testsuite/g++.dg/debug/dwarf2/enum1.C index ffc936108ed..bbf80dd819a 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/enum1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/enum1.C @@ -1,5 +1,5 @@ // { dg-do compile { target c++11 } } -// { dg-options "-g -dA -gno-strict-dwarf" } +// { dg-options "-gdwarf-2 -dA -gno-strict-dwarf" } // { dg-final { scan-assembler-times "DIE\[^\n\r\]*DW_TAG_enumeration_type" 3 } } // { dg-final { scan-assembler-times " DW_AT_enum_class" 2 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C b/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C index 782d71aea18..894b20047ce 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C @@ -1,7 +1,7 @@ // Contributed by Dodji Seketeli // Origin: PR c++ // { dg-do compile } -// { dg-options "-O -g -dA -gno-strict-dwarf -fno-debug-types-section" } +// { dg-options "-O -gdwarf-2 -dA -gno-strict-dwarf -fno-debug-types-section" } // { dg-final { scan-assembler-times "DW_AT_explicit" 2 } } struct Foo diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C index 702a33f53ed..30117e6ab70 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C @@ -1,5 +1,5 @@ // Contributed by Dodji Seketeli -// { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -fno-debug-types-section" } // { dg-do compile } // { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumeration_type" 1 } } // { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumerator" 2 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C index 65141d74edb..5bd0fa894f4 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C @@ -1,7 +1,7 @@ // Contributed by Dodji Seketeli // Origin: PR debug/38390 // { dg-do compile } -// { dg-options "-g -dA -gno-strict-dwarf" } +// { dg-options "-gdwarf-2 -dA -gno-strict-dwarf" } // { dg-final { scan-assembler "DW_TAG_imported_module" } } namespace A diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C index 6c563752a49..bd6dd1f530d 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C @@ -1,6 +1,6 @@ // PR debug/39379 // { dg-do compile } -// { dg-options "-g -dA -gno-strict-dwarf" } +// { dg-options "-gdwarf-2 -dA -gno-strict-dwarf" } // { dg-final { scan-assembler "DW_TAG_imported_module" } } namespace A diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C index a325ce20f63..c25241dc077 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C @@ -1,6 +1,6 @@ // PR debug/39379 // { dg-do compile } -// { dg-options "-g -dA -gno-strict-dwarf" } +// { dg-options "-gdwarf-2 -dA -gno-strict-dwarf" } // { dg-final { scan-assembler "DW_TAG_imported_module" } } namespace A diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C b/gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C index f22fe28a369..46d9fafab42 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C @@ -1,5 +1,5 @@ // Origin: PR debug/49130 -// { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -fno-debug-types-section" } typedef long unsigned int size_t; static const size_t foo = 2048; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C b/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C index b315275e387..ac62312df29 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C @@ -1,6 +1,6 @@ // PR c++/43912 // { dg-do compile { target c++11 } } -// { dg-options "-g -dA -fno-merge-debug-strings -gno-strict-dwarf" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -gno-strict-dwarf" } // Check for the local alias variables that point to the members of the closure. // { dg-final { scan-assembler-times "DW_TAG_variable\[^.\]*\.ascii \"j.0\"" 4 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp98.C b/gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp98.C index 065cc18264e..e7272dade99 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp98.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp98.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-O -std=c++98 -g -dA" } +// { dg-options "-O -std=c++98 -gdwarf-2 -dA" } // DW_LANG_C_plus_plus = 0x0004 // { dg-final { scan-assembler "0x4.*DW_AT_language" } } */ diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C b/gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C index 3fcc4f235fc..55ecc18a3bd 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-g -O0 -dA" } +// { dg-options "-gdwarf-2 -O0 -dA" } struct C { // { dg-function-on-line {_ZN1CC[12]Ev} } int i; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C b/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C index d61d27fe7e4..fafff62eab6 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C @@ -1,7 +1,7 @@ // Contributed by Dodji Seketeli // Origin PR27574 // { dg-do compile } -// { dg-options "-O0 -g" } +// { dg-options "-O0 -gdwarf-2" } // { dg-final { scan-assembler "problem" } } void f (int *) diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/localclass3.C b/gcc/testsuite/g++.dg/debug/dwarf2/localclass3.C index b4baaa1f7e0..668a4a3c586 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/localclass3.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/localclass3.C @@ -1,6 +1,6 @@ // Test that the A* pointer_type is also within the debug info for f. // Currently GCC emits it immediately before A, which is simple to test for. -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } void f() { diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C index 6137125ec8a..c86f9b1a6e2 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // Origin PR debug/41170 -// { dg-options "-g -dA -fno-merge-debug-strings -gno-strict-dwarf" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -gno-strict-dwarf" } // // We want to test that there is a DW_TAG_namespace DIE DW_AT_name is set // to "not_emitted". That namespace die has a child DW_TAG_typedef DIE diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C index 8715ca684a5..6cd2e5f0c50 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C @@ -1,6 +1,6 @@ // Test that we define A inside the namespace rather than declaring it // there and then defining it at CU scope. -// { dg-options "-g -dA -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-debug-types-section" } // { dg-final { scan-assembler-not "DW_AT_declaration" } } namespace N { diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/nested-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/nested-1.C index 336582c112a..a6232ebd12e 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/nested-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-1.C @@ -1,7 +1,7 @@ // Contributed by Dodji Seketeli // Origin PR debug/40109 // { dg-do compile } -// { dg-options "-g -dA -O0" } +// { dg-options "-gdwarf-2 -dA -O0" } namespace A { diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C index b0c858c54af..e08bac97ada 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C @@ -1,6 +1,6 @@ /* Origin: PR debug/45024 - { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" } + { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -fno-debug-types-section" } { dg-do compile } */ diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C b/gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C index 8ad347a7cc3..2c1461f484d 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-g2 -dA" } +// { dg-options "-gdwarf-2 -g2 -dA" } // Verify that line number info is output for the non-virtual // thunks for C::~C(). diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C index 7b061eb0e6b..f08079c7656 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C @@ -1,6 +1,6 @@ // Origin: PR 44641 // { dg-do compile } -// { dg-options "-g -O0 -dA" } +// { dg-options "-gdwarf-2 -O0 -dA" } template struct MisplacedDbg; template struct MisplacedDbg; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C index dfc983b177d..d29dfc0a11c 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C @@ -1,6 +1,6 @@ // Origin: PR 46527 // { dg-do compile } -// { dg-options "-g -O0 -dA" } +// { dg-options "-gdwarf-2 -O0 -dA" } template struct Struct { double defined_later(); diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C index f1c77c59138..e7a6aa41c0d 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C @@ -1,6 +1,6 @@ // PR debug/54508 // { dg-do compile } -// { dg-options "-g2 -dA -fno-merge-debug-strings" } +// { dg-options "-gdwarf-2 -g2 -dA -fno-merge-debug-strings" } // { dg-final { scan-assembler "\"cbase\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } // { dg-final { scan-assembler "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C index 63e04e42676..0d241981ae2 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C @@ -1,7 +1,7 @@ // Contributed by Dodji Seketeli // Origin PR debug/39706 // { dg-do compile { target *-*-darwin* } } -// { dg-options "-g -dA -fno-merge-debug-strings" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } // // There should be one debug_pubnames section generated. // { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 1 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C index 325647e13fe..de12b692563 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C @@ -1,5 +1,5 @@ // Origin: PR debug/43325 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-do compile } // { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE \[^\n\r\]*DW_TAG_lexical_block\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_low_pc\[\n\r\]{1,2}\[^\n\r\]*DW_AT_high_pc\[\n\r\]{1,2}\[^\n\r\]*\\(DIE \[^\n\r\]*DW_TAG_variable\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_name" 2 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C index 89467adc212..0cb5f8ac33c 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C @@ -1,6 +1,6 @@ // Origin: PR debug/45088 // { dg-do compile } -// { dg-options "-g -dA -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-debug-types-section" } // { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_pointer_type\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_byte_size\[\n\r\]{1,2}\[^\n\r\]*DW_AT_type" 4 } } struct A diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C index c319c68a2bd..eaf0c3ecc45 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C @@ -1,6 +1,6 @@ // Origin: PR debug/45088 // { dg-do compile } -// { dg-options "-g -dA -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-debug-types-section" } // { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_pointer_type\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_byte_size\[\n\r\]{1,2}\[^\n\r\]*DW_AT_type" 4 } } template diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C b/gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C index b807e477c6a..460afd02795 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -fno-debug-types-section" } struct A { diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C b/gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C index a1bf6b53cd4..c10b521f9ee 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C @@ -1,6 +1,6 @@ // PR debug/39372 // { dg-do compile } -// { dg-options "-O0 -g -dA" } +// { dg-options "-O0 -gdwarf-2 -dA" } // { dg-final { scan-assembler "DW_OP_addr\[^\n\r\]*\[\n\r\]*\[^\n\r\]*staticvar1" } } // { dg-final { scan-assembler "DW_OP_addr\[^\n\r\]*\[\n\r\]*\[^\n\r\]*staticvar2" } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C index 3a43d9fa571..5daa2205f2a 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // origin PR debug/30161 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-do compile } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "U.*DW_AT_name" } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C index 27c68d79643..670598ba93e 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // origin PR debug/30161 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-do compile } // { dg-final { scan-assembler "DW_TAG_template_value_param" } } // { dg-final { scan-assembler "i.*DW_AT_name" } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C index 4c72490351b..a356a2ef965 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 -// { dg-options "-g -dA -gno-strict-dwarf -fno-merge-debug-strings" } +// { dg-options "-gdwarf-2 -dA -gno-strict-dwarf -fno-merge-debug-strings" } // { dg-final { scan-assembler "DW_TAG_template_value_param" } } // { dg-final { scan-assembler "f.*DW_AT_name" } } // { dg-final { scan-assembler "DW_AT_location\[^\\r\\n\]*\[\\r\\n\]*\[^\\r\\n\]*DW_OP_addr\[^\\r\\n\]*\[\\r\\n\]*\[^\\r\\n\]*_Z4blehv\[^\\r\\n\]*\[\\r\\n\]*\[^\\r\\n\]*DW_OP_stack_value" } } */ diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C index c584e900d0d..657b685116b 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C @@ -1,7 +1,7 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 // { dg-do compile { target c++11 } } -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // // In theory the compiler instantiates count, // count and count. In practice, only diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C index c4fd8dc3e77..cc8b1ac000f 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "T.*DW_AT_name" } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C index 99bbba3da8d..26a97731a3f 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 -// { dg-options "-g -dA -fno-merge-debug-strings" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } // { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } } // { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } } // { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C index 7bdcc4d46ca..9ce58a436af 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 -// { dg-options "-g -dA -fno-merge-debug-strings" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } // { dg-do compile { target c++11 } } // There must be 5 subprograms generated: diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C index e28297b5591..b8f92023adf 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // origin PR debug/30161 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-do compile } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "U.*DW_AT_name" } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-10.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-10.C index c12fe399026..95cf4553fb2 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-10.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-10.C @@ -1,5 +1,5 @@ // Origin PR c++/47291 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-do compile } struct S; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C index 8000295537c..90051636275 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C @@ -1,5 +1,5 @@ // PR c++/54410 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_type_param" 1 } } namespace N { diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C index ce5fbab74b0..0a00fd607e6 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // origin PR debug/30161 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-do compile } // { dg-final { scan-assembler "DW_TAG_template_value_param" } } // { dg-final { scan-assembler "i.*DW_AT_name" } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C index e69e1c9f37b..fc309ecec7f 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 -// { dg-options "-g -dA -gno-strict-dwarf -fno-merge-debug-strings" } +// { dg-options "-gdwarf-2 -dA -gno-strict-dwarf -fno-merge-debug-strings" } // { dg-final { scan-assembler "DW_TAG_template_value_param" } } // { dg-final { scan-assembler "f.*DW_AT_name" } } // { dg-final { scan-assembler "DW_AT_location\[^\\r\\n\]*\[\\r\\n\]*\[^\\r\\n\]*DW_OP_addr\[^\\r\\n\]*\[\\r\\n\]*\[^\\r\\n\]*_Z4blehv\[^\\r\\n\]*\[\\r\\n\]*\[^\\r\\n\]*DW_OP_stack_value" } } */ diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C index 0e63293ae4f..fba6320027d 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C @@ -1,7 +1,7 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 // { dg-do compile { target c++11 } } -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // // In theory the compiler instantiates count, // count and count. In practice, only diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C index f36eac5f334..02584981db5 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "T.*DW_AT_name" } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C index 06cdef5b242..0a454325740 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 -// { dg-options "-g -dA -fno-merge-debug-strings" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } // { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } } // { dg-final { scan-assembler-times "\"vector.0\"\[^\n\]*DW_AT_GNU_template_name" 1 } } // { dg-final { scan-assembler-times ".ascii \"U.0\"\[^\n\]*DW_AT_name" 1 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C index c1eedd6a185..7fde210a8fc 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C @@ -1,7 +1,7 @@ // Contributed by Dodji Seketeli // Origin PR debug/30161 // { dg-do compile { target c++11 } } -// { dg-options "-g -dA -fno-merge-debug-strings" } +// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } // The type M<> should have one DW_TAG_GNU_template_parameter_pack DIE, // with no DW_AT_name attribute. We don't test the fact that it has no diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-8.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-8.C index db4e0580ab8..4136be5e1fc 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-8.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-8.C @@ -1,5 +1,5 @@ // Origin PR debug/46955 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-do compile } struct S { int f; }; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C index 7af1d9192f8..21d3385a920 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C @@ -1,5 +1,5 @@ // Origin PR debug/PR46973 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-do compile } struct S diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C index 795dc7f40ae..961e7bce1db 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli // Origin: PR c++/40705 -// { dg-options "-g -dA -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-debug-types-section" } // { dg-do compile } // { dg-final { scan-assembler-times "DW_TAG_structure_type" 2 } } // { dg-final { scan-assembler-times "DW_AT_name: \"foo<1u>\"|\"foo<1u>..\"\[^\n\]*DW_AT_name" 1 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C index 0bc27f264e2..af6d51cec9b 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C @@ -1,5 +1,5 @@ // Origin: PR debug/43628 -// { dg-options "-g -dA -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-debug-types-section" } // { dg-do compile } // { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_formal_parameter\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_type\[\n\r\]{1,2}" 1 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef3.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef3.C index ca70d9cacfa..29b04e4c833 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef3.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef3.C @@ -1,5 +1,5 @@ // Origin: PR debug/44188 -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } // { dg-do compile } // { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_typedef\\)" 1 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C index 6749e1bd3fd..ddd20d82bcb 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C @@ -1,5 +1,5 @@ // Origin: PR debug/45171 -// { dg-options "-g -dA -fno-eliminate-unused-debug-types -fno-debug-types-section" } +// { dg-options "-gdwarf-2 -dA -fno-eliminate-unused-debug-types -fno-debug-types-section" } // { dg-do compile } // There should be 2 real instances of byte_size -- one for the diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C index b742c1dfd41..b541ae4b57e 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C @@ -1,5 +1,5 @@ // Origin: PR debug/46101 -// { dg-options "-g -feliminate-dwarf2-dups" } +// { dg-options "-gdwarf-2 -feliminate-dwarf2-dups" } // { dg-do compile } typedef struct diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C index 8896446a7ed..7945deadaa2 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C @@ -1,5 +1,5 @@ // Origin PR debug/ -// { dg-options "-g -dA" } +// { dg-options "-gdwarf-2 -dA" } class C { public: -- 2.30.2