Currently, most tests in g++.dg/debug/dwarf2 include a "dg-options" line which passes "-g" to the compiler. This overrides the "-gdwarf-2" that appears in DEFAULT_CFLAGS in dwarf2.exp.
As a consequence, default debug information is generated, which in systems when dwarf-2 is not the default makes al these tests fail. IMHO, "dg-options" should include "-gdwarf-2" instead of plain "-g". I detected this wile running "make check" on my powerpc-apple-darwin8.11.0 for gcc-4.8.4. Patch is for trunk, however. Carlos 2015-07-08 Carlos Sánchez de La Lama <csanchez...@gmail.com> * g++.dg/debug/dwarf2/*.C: generate dwarf-2 debug information even when dwarf-2 is not the default.
*** gcc/testsuite/g++.dg/debug/dwarf2/accessibility1.C --- gcc/testsuite/g++.dg/debug/dwarf2/accessibility1.C 2015-07-08 14:21:09.000000000 +0200 *************** *** 1,6 **** // PR debug/44668 // { dg-do compile } ! // { dg-options "-g -dA" } struct C { --- 1,6 ---- // PR debug/44668 // { dg-do compile } ! // { dg-options "-gdwarf-2 -dA" } struct C { *** gcc/testsuite/g++.dg/debug/dwarf2/auto1.C --- gcc/testsuite/g++.dg/debug/dwarf2/auto1.C 2015-07-08 15:56:07.000000000 +0200 *************** *** 1,6 **** // PR c++/53756 // { dg-do compile { target c++14 } } ! // { dg-options "-g -dA -fno-debug-types-section" } // We're looking for something like // .uleb128 0x3 # (DIE (0x33) DW_TAG_subprogram) --- 1,6 ---- // PR c++/53756 // { dg-do compile { target c++14 } } ! // { dg-options "-gdwarf-2 -dA -fno-debug-types-section" } // We're looking for something like // .uleb128 0x3 # (DIE (0x33) DW_TAG_subprogram) *** gcc/testsuite/g++.dg/debug/dwarf2/block.C --- gcc/testsuite/g++.dg/debug/dwarf2/block.C 2015-07-08 15:56:24.000000000 +0200 *************** *** 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" } union UElement { void* pointer; --- 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 -gdwarf-2 -dA" } union UElement { void* pointer; *** gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C --- gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C 2015-07-08 14:21:09.000000000 +0200 *************** *** 1,5 **** // origin PR debug/49047 ! // { dg-options "-g -dA -fno-merge-debug-strings" } // { dg-do compile } struct K --- 1,5 ---- // origin PR debug/49047 ! // { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } // { dg-do compile } struct K *** gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C --- gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C 2015-07-08 15:56:38.000000000 +0200 *************** *** 5,11 **** // 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" } struct t { t (); --- 5,11 ---- // 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 -gdwarf-2 -dA" } struct t { t (); *** gcc/testsuite/g++.dg/debug/dwarf2/enum1.C --- gcc/testsuite/g++.dg/debug/dwarf2/enum1.C 2015-07-08 15:27:41.000000000 +0200 *************** *** 1,5 **** // { dg-do compile { target c++11 } } ! // { dg-options "-g -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 } } --- 1,5 ---- // { dg-do compile { target c++11 } } ! // { 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 } } *** gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C --- gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C 2015-07-08 15:28:38.000000000 +0200 *************** *** 1,7 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin: PR c++ // { dg-do compile } ! // { dg-options "-O -g -dA -gno-strict-dwarf -fno-debug-types-section" } // { dg-final { scan-assembler-times "DW_AT_explicit" 2 } } struct Foo --- 1,7 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin: PR c++ // { dg-do compile } ! // { dg-options "-O -gdwarf-2 -dA -gno-strict-dwarf -fno-debug-types-section" } // { dg-final { scan-assembler-times "DW_AT_explicit" 2 } } struct Foo *** gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C --- gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C 2015-07-08 15:29:44.000000000 +0200 *************** *** 1,5 **** // Contributed by Dodji Seketeli <do...@redhat.com> ! // { dg-options "-g -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 } } --- 1,5 ---- // Contributed by Dodji Seketeli <do...@redhat.com> ! // { 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 } } *** gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C --- gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,7 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin: PR debug/38390 // { dg-do compile } ! // { dg-options "-g -dA -gno-strict-dwarf" } // { dg-final { scan-assembler "DW_TAG_imported_module" } } namespace A --- 1,7 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin: PR debug/38390 // { dg-do compile } ! // { dg-options "-gdwarf-2 -dA -gno-strict-dwarf" } // { dg-final { scan-assembler "DW_TAG_imported_module" } } namespace A *** gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C --- gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,6 **** // PR debug/39379 // { dg-do compile } ! // { dg-options "-g -dA -gno-strict-dwarf" } // { dg-final { scan-assembler "DW_TAG_imported_module" } } namespace A --- 1,6 ---- // PR debug/39379 // { dg-do compile } ! // { dg-options "-gdwarf-2 -dA -gno-strict-dwarf" } // { dg-final { scan-assembler "DW_TAG_imported_module" } } namespace A *** gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C --- gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,6 **** // PR debug/39379 // { dg-do compile } ! // { dg-options "-g -dA -gno-strict-dwarf" } // { dg-final { scan-assembler "DW_TAG_imported_module" } } namespace A --- 1,6 ---- // PR debug/39379 // { dg-do compile } ! // { dg-options "-gdwarf-2 -dA -gno-strict-dwarf" } // { dg-final { scan-assembler "DW_TAG_imported_module" } } namespace A *** gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C --- gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C 2015-07-08 15:30:53.000000000 +0200 *************** *** 1,5 **** // Origin: PR debug/49130 ! // { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" } typedef long unsigned int size_t; static const size_t foo = 2048; --- 1,5 ---- // Origin: PR debug/49130 ! // { 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; *** gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C --- gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C 2015-07-08 15:31:38.000000000 +0200 *************** *** 1,6 **** // PR c++/43912 // { dg-do compile { target c++11 } } ! // { dg-options "-g -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 } } --- 1,6 ---- // PR c++/43912 // { dg-do compile { target c++11 } } ! // { 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 } } *** gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp98.C --- gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp98.C 2015-07-08 15:56:56.000000000 +0200 *************** *** 1,5 **** // { dg-do compile } ! // { dg-options "-O -std=c++98 -g -dA" } // DW_LANG_C_plus_plus = 0x0004 // { dg-final { scan-assembler "0x4.*DW_AT_language" } } */ --- 1,5 ---- // { dg-do compile } ! // { dg-options "-O -std=c++98 -gdwarf-2 -dA" } // DW_LANG_C_plus_plus = 0x0004 // { dg-final { scan-assembler "0x4.*DW_AT_language" } } */ *** gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C --- gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,5 **** // { dg-do compile } ! // { dg-options "-g -O0 -dA" } struct C { // { dg-function-on-line {_ZN1CC[12]Ev} } int i; --- 1,5 ---- // { dg-do compile } ! // { dg-options "-gdwarf-2 -O0 -dA" } struct C { // { dg-function-on-line {_ZN1CC[12]Ev} } int i; *** gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C --- gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C 2015-07-08 15:57:15.000000000 +0200 *************** *** 1,7 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR27574 // { dg-do compile } ! // { dg-options "-O0 -g" } // { dg-final { scan-assembler "problem" } } void f (int *) --- 1,7 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR27574 // { dg-do compile } ! // { dg-options "-O0 -gdwarf-2" } // { dg-final { scan-assembler "problem" } } void f (int *) *** gcc/testsuite/g++.dg/debug/dwarf2/localclass3.C --- gcc/testsuite/g++.dg/debug/dwarf2/localclass3.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 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" } void f() { --- 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 "-gdwarf-2 -dA" } void f() { *** gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C --- gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/41170 ! // { dg-options "-g -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 --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/41170 ! // { 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 *** gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C --- gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C 2015-07-08 15:58:10.000000000 +0200 *************** *** 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-final { scan-assembler-not "DW_AT_declaration" } } namespace N { --- 1,6 ---- // Test that we define A inside the namespace rather than declaring it // there and then defining it at CU scope. ! // { dg-options "-gdwarf-2 -dA -fno-debug-types-section" } // { dg-final { scan-assembler-not "DW_AT_declaration" } } namespace N { *** gcc/testsuite/g++.dg/debug/dwarf2/nested-1.C --- gcc/testsuite/g++.dg/debug/dwarf2/nested-1.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,7 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/40109 // { dg-do compile } ! // { dg-options "-g -dA -O0" } namespace A { --- 1,7 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/40109 // { dg-do compile } ! // { dg-options "-gdwarf-2 -dA -O0" } namespace A { *** gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C --- gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C 2015-07-08 15:50:24.000000000 +0200 *************** *** 1,6 **** /* Origin: PR debug/45024 ! { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" } { dg-do compile } */ --- 1,6 ---- /* Origin: PR debug/45024 ! { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -fno-debug-types-section" } { dg-do compile } */ *** gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C --- gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,5 **** // { dg-do compile } ! // { dg-options "-g2 -dA" } // Verify that line number info is output for the non-virtual // thunks for C::~C(). --- 1,5 ---- // { dg-do compile } ! // { dg-options "-gdwarf-2 -g2 -dA" } // Verify that line number info is output for the non-virtual // thunks for C::~C(). *** gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C --- gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,6 **** // Origin: PR 44641 // { dg-do compile } ! // { dg-options "-g -O0 -dA" } template <class A> struct MisplacedDbg; template<class T> struct MisplacedDbg<T*>; --- 1,6 ---- // Origin: PR 44641 // { dg-do compile } ! // { dg-options "-gdwarf-2 -O0 -dA" } template <class A> struct MisplacedDbg; template<class T> struct MisplacedDbg<T*>; *** gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C --- gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,6 **** // Origin: PR 46527 // { dg-do compile } ! // { dg-options "-g -O0 -dA" } template <typename T> struct Struct { double defined_later(); --- 1,6 ---- // Origin: PR 46527 // { dg-do compile } ! // { dg-options "-gdwarf-2 -O0 -dA" } template <typename T> struct Struct { double defined_later(); *** gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C --- gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,6 **** // PR debug/54508 // { dg-do compile } ! // { dg-options "-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" } } --- 1,6 ---- // PR debug/54508 // { dg-do compile } ! // { 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" } } *** gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C --- gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,7 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/39706 // { dg-do compile { target *-*-darwin* } } ! // { dg-options "-g -dA -fno-merge-debug-strings" } // // There should be one debug_pubnames section generated. // { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 1 } } --- 1,7 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/39706 // { dg-do compile { target *-*-darwin* } } ! // { 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 } } *** gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C --- gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C 2015-07-08 14:21:10.000000000 +0200 *************** *** 1,5 **** // Origin: PR debug/43325 ! // { dg-options "-g -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 } } --- 1,5 ---- // Origin: PR debug/43325 ! // { 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 } } *** gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C --- gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C 2015-07-08 15:51:02.000000000 +0200 *************** *** 1,6 **** // Origin: PR debug/45088 // { dg-do compile } ! // { dg-options "-g -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 --- 1,6 ---- // Origin: PR debug/45088 // { dg-do compile } ! // { 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 *** gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C --- gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C 2015-07-08 15:51:25.000000000 +0200 *************** *** 1,6 **** // Origin: PR debug/45088 // { dg-do compile } ! // { dg-options "-g -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<class T> --- 1,6 ---- // Origin: PR debug/45088 // { dg-do compile } ! // { 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<class T> *** gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C --- gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C 2015-07-08 15:51:55.000000000 +0200 *************** *** 1,5 **** // { dg-do compile } ! // { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" } struct A { --- 1,5 ---- // { dg-do compile } ! // { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -fno-debug-types-section" } struct A { *** gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C --- gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // PR debug/39372 // { dg-do compile } ! // { dg-options "-O0 -g -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" } } --- 1,6 ---- // PR debug/39372 // { dg-do compile } ! // { 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" } } *** gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // origin PR debug/30161 ! // { dg-options "-g -dA" } // { dg-do compile } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "U.*DW_AT_name" } } --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // origin PR debug/30161 ! // { 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" } } *** gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // origin PR debug/30161 ! // { dg-options "-g -dA" } // { dg-do compile } // { dg-final { scan-assembler "DW_TAG_template_value_param" } } // { dg-final { scan-assembler "i.*DW_AT_name" } } --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // origin PR debug/30161 ! // { 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" } } *** gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-g -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" } } */ --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { 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" } } */ *** gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C 2015-07-08 15:52:31.000000000 +0200 *************** *** 1,7 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 // { dg-do compile { target c++11 } } ! // { dg-options "-g -dA" } // // In theory the compiler instantiates count<int, char, long>, // count<char, long> and count<long>. In practice, only --- 1,7 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 // { dg-do compile { target c++11 } } ! // { dg-options "-gdwarf-2 -dA" } // // In theory the compiler instantiates count<int, char, long>, // count<char, long> and count<long>. In practice, only *** gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-g -dA" } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "T.*DW_AT_name" } } --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-gdwarf-2 -dA" } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "T.*DW_AT_name" } } *** gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-g -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 } } --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { 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 } } *** gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C 2015-07-08 15:53:03.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-g -dA -fno-merge-debug-strings" } // { dg-do compile { target c++11 } } // There must be 5 subprograms generated: --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } // { dg-do compile { target c++11 } } // There must be 5 subprograms generated: *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // origin PR debug/30161 ! // { dg-options "-g -dA" } // { dg-do compile } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "U.*DW_AT_name" } } --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // origin PR debug/30161 ! // { 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" } } *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-10.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-10.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,5 **** // Origin PR c++/47291 ! // { dg-options "-g -dA" } // { dg-do compile } struct S; --- 1,5 ---- // Origin PR c++/47291 ! // { dg-options "-gdwarf-2 -dA" } // { dg-do compile } struct S; *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,5 **** // PR c++/54410 ! // { dg-options "-g -dA" } // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_type_param" 1 } } namespace N { --- 1,5 ---- // PR c++/54410 ! // { dg-options "-gdwarf-2 -dA" } // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_type_param" 1 } } namespace N { *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // origin PR debug/30161 ! // { dg-options "-g -dA" } // { dg-do compile } // { dg-final { scan-assembler "DW_TAG_template_value_param" } } // { dg-final { scan-assembler "i.*DW_AT_name" } } --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // origin PR debug/30161 ! // { 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" } } *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-g -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" } } */ --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { 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" } } */ *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C 2015-07-08 15:53:35.000000000 +0200 *************** *** 1,7 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 // { dg-do compile { target c++11 } } ! // { dg-options "-g -dA" } // // In theory the compiler instantiates count<int, char, long>, // count<char, long> and count<long>. In practice, only --- 1,7 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 // { dg-do compile { target c++11 } } ! // { dg-options "-gdwarf-2 -dA" } // // In theory the compiler instantiates count<int, char, long>, // count<char, long> and count<long>. In practice, only *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-g -dA" } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "T.*DW_AT_name" } } --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-gdwarf-2 -dA" } // { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "T.*DW_AT_name" } } *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C 2015-07-08 14:21:11.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { dg-options "-g -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 } } --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 ! // { 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 } } *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C 2015-07-08 15:53:56.000000000 +0200 *************** *** 1,7 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 // { dg-do compile { target c++11 } } ! // { dg-options "-g -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 --- 1,7 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin PR debug/30161 // { dg-do compile { target c++11 } } ! // { 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 *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-8.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-8.C 2015-07-08 14:21:12.000000000 +0200 *************** *** 1,5 **** // Origin PR debug/46955 ! // { dg-options "-g -dA" } // { dg-do compile } struct S { int f; }; --- 1,5 ---- // Origin PR debug/46955 ! // { dg-options "-gdwarf-2 -dA" } // { dg-do compile } struct S { int f; }; *** gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C 2015-07-08 14:21:12.000000000 +0200 *************** *** 1,5 **** // Origin PR debug/PR46973 ! // { dg-options "-g -dA" } // { dg-do compile } struct S --- 1,5 ---- // Origin PR debug/PR46973 ! // { dg-options "-gdwarf-2 -dA" } // { dg-do compile } struct S *** gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C --- gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C 2015-07-08 15:54:44.000000000 +0200 *************** *** 1,6 **** // Contributed by Dodji Seketeli <do...@redhat.com> // Origin: PR c++/40705 ! // { dg-options "-g -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 } } --- 1,6 ---- // Contributed by Dodji Seketeli <do...@redhat.com> // Origin: PR c++/40705 ! // { 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 } } *** gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C --- gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C 2015-07-08 15:55:10.000000000 +0200 *************** *** 1,5 **** // Origin: PR debug/43628 ! // { dg-options "-g -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 } } --- 1,5 ---- // Origin: PR debug/43628 ! // { 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 } } *** gcc/testsuite/g++.dg/debug/dwarf2/typedef3.C --- gcc/testsuite/g++.dg/debug/dwarf2/typedef3.C 2015-07-08 14:21:12.000000000 +0200 *************** *** 1,5 **** // Origin: PR debug/44188 ! // { dg-options "-g -dA" } // { dg-do compile } // { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_typedef\\)" 1 } } --- 1,5 ---- // Origin: PR debug/44188 ! // { dg-options "-gdwarf-2 -dA" } // { dg-do compile } // { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_typedef\\)" 1 } } *** gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C --- gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C 2015-07-08 15:55:39.000000000 +0200 *************** *** 1,5 **** // Origin: PR debug/45171 ! // { dg-options "-g -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 --- 1,5 ---- // Origin: PR debug/45171 ! // { 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 *** gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C --- gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C 2015-07-08 14:21:12.000000000 +0200 *************** *** 1,5 **** // Origin: PR debug/46101 ! // { dg-options "-g -feliminate-dwarf2-dups" } // { dg-do compile } typedef struct --- 1,5 ---- // Origin: PR debug/46101 ! // { dg-options "-gdwarf-2 -feliminate-dwarf2-dups" } // { dg-do compile } typedef struct *** gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C --- gcc/testsuite/g++.dg/debug/dwarf2/typedef6.C 2015-07-08 14:21:12.000000000 +0200 *************** *** 1,5 **** // Origin PR debug/ ! // { dg-options "-g -dA" } class C { public: --- 1,5 ---- // Origin PR debug/ ! // { dg-options "-gdwarf-2 -dA" } class C { public: