Commit ca506be6 by Carlos Sánchez de La Lama Committed by Jeff Law

*.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
parent 9e11bfef
2015-07-08 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
* g++.dg/debug/dwarf2/*.C: generate dwarf-2 debug information
even when dwarf-2 is not the default.
2015-07-08 Jeff Law <law@redhat.com> 2015-07-08 Jeff Law <law@redhat.com>
PR testsuite/66796 PR testsuite/66796
......
// PR debug/44668 // PR debug/44668
// { dg-do compile } // { dg-do compile }
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
struct C struct C
{ {
......
// PR c++/53756 // PR c++/53756
// { dg-do compile { target c++14 } } // { 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 // We're looking for something like
// .uleb128 0x3 # (DIE (0x33) DW_TAG_subprogram) // .uleb128 0x3 # (DIE (0x33) DW_TAG_subprogram)
......
// Compiler should not generate too many lexical blocks for this function. // Compiler should not generate too many lexical blocks for this function.
// { dg-do compile { target { i?86-*-* x86_64-*-* } } } // { 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 { union UElement {
void* pointer; void* pointer;
......
// origin PR debug/49047 // origin PR debug/49047
// { dg-options "-g -dA -fno-merge-debug-strings" } // { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" }
// { dg-do compile } // { dg-do compile }
struct K struct K
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// FE generated debug info, without losing generality, only x86 // FE generated debug info, without losing generality, only x86
// assembly is scanned in this test. // assembly is scanned in this test.
// { dg-do compile { target { i?86-*-* x86_64-*-* } } } // { 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 { struct t {
t (); t ();
......
// { dg-do compile { target c++11 } } // { 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 "DIE\[^\n\r\]*DW_TAG_enumeration_type" 3 } }
// { dg-final { scan-assembler-times " DW_AT_enum_class" 2 } } // { dg-final { scan-assembler-times " DW_AT_enum_class" 2 } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++ // Origin: PR c++
// { dg-do compile } // { 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 } } // { dg-final { scan-assembler-times "DW_AT_explicit" 2 } }
struct Foo struct Foo
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// { 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-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_enumeration_type" 1 } }
// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumerator" 2 } } // { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumerator" 2 } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR debug/38390 // Origin: PR debug/38390
// { dg-do compile } // { 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" } } // { dg-final { scan-assembler "DW_TAG_imported_module" } }
namespace A namespace A
......
// PR debug/39379 // PR debug/39379
// { dg-do compile } // { 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" } } // { dg-final { scan-assembler "DW_TAG_imported_module" } }
namespace A namespace A
......
// PR debug/39379 // PR debug/39379
// { dg-do compile } // { 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" } } // { dg-final { scan-assembler "DW_TAG_imported_module" } }
namespace A namespace A
......
// Origin: PR debug/49130 // 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; typedef long unsigned int size_t;
static const size_t foo = 2048; static const size_t foo = 2048;
......
// PR c++/43912 // PR c++/43912
// { dg-do compile { target c++11 } } // { 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. // 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 } } // { dg-final { scan-assembler-times "DW_TAG_variable\[^.\]*\.ascii \"j.0\"" 4 } }
......
// { dg-do compile } // { 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 // DW_LANG_C_plus_plus = 0x0004
// { dg-final { scan-assembler "0x4.*DW_AT_language" } } */ // { dg-final { scan-assembler "0x4.*DW_AT_language" } } */
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-g -O0 -dA" } // { dg-options "-gdwarf-2 -O0 -dA" }
struct C { // { dg-function-on-line {_ZN1CC[12]Ev} } struct C { // { dg-function-on-line {_ZN1CC[12]Ev} }
int i; int i;
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR27574 // Origin PR27574
// { dg-do compile } // { dg-do compile }
// { dg-options "-O0 -g" } // { dg-options "-O0 -gdwarf-2" }
// { dg-final { scan-assembler "problem" } } // { dg-final { scan-assembler "problem" } }
void f (int *) void f (int *)
......
// Test that the A* pointer_type is also within the debug info for f. // 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. // Currently GCC emits it immediately before A, which is simple to test for.
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
void f() void f()
{ {
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/41170 // 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 // 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 // to "not_emitted". That namespace die has a child DW_TAG_typedef DIE
......
// Test that we define A inside the namespace rather than declaring it // Test that we define A inside the namespace rather than declaring it
// there and then defining it at CU scope. // 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" } } // { dg-final { scan-assembler-not "DW_AT_declaration" } }
namespace N { namespace N {
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/40109 // Origin PR debug/40109
// { dg-do compile } // { dg-do compile }
// { dg-options "-g -dA -O0" } // { dg-options "-gdwarf-2 -dA -O0" }
namespace A namespace A
{ {
......
/* /*
Origin: PR debug/45024 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 } { dg-do compile }
*/ */
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-g2 -dA" } // { dg-options "-gdwarf-2 -g2 -dA" }
// Verify that line number info is output for the non-virtual // Verify that line number info is output for the non-virtual
// thunks for C::~C(). // thunks for C::~C().
......
// Origin: PR 44641 // Origin: PR 44641
// { dg-do compile } // { dg-do compile }
// { dg-options "-g -O0 -dA" } // { dg-options "-gdwarf-2 -O0 -dA" }
template <class A> struct MisplacedDbg; template <class A> struct MisplacedDbg;
template<class T> struct MisplacedDbg<T*>; template<class T> struct MisplacedDbg<T*>;
......
// Origin: PR 46527 // Origin: PR 46527
// { dg-do compile } // { dg-do compile }
// { dg-options "-g -O0 -dA" } // { dg-options "-gdwarf-2 -O0 -dA" }
template <typename T> struct Struct { template <typename T> struct Struct {
double defined_later(); double defined_later();
......
// PR debug/54508 // PR debug/54508
// { dg-do compile } // { 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 "\"cbase\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
// { dg-final { scan-assembler "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } // { dg-final { scan-assembler "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/39706 // Origin PR debug/39706
// { dg-do compile { target *-*-darwin* } } // { 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. // There should be one debug_pubnames section generated.
// { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 1 } } // { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 1 } }
......
// Origin: PR debug/43325 // Origin: PR debug/43325
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// { dg-do compile } // { 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 } } // { 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 } }
......
// Origin: PR debug/45088 // Origin: PR debug/45088
// { dg-do compile } // { 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 } } // { 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 struct A
......
// Origin: PR debug/45088 // Origin: PR debug/45088
// { dg-do compile } // { 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 } } // { 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> template<class T>
......
// { dg-do compile } // { 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 struct A
{ {
......
// PR debug/39372 // PR debug/39372
// { dg-do compile } // { 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\]*staticvar1" } }
// { dg-final { scan-assembler "DW_OP_addr\[^\n\r\]*\[\n\r\]*\[^\n\r\]*staticvar2" } } // { dg-final { scan-assembler "DW_OP_addr\[^\n\r\]*\[\n\r\]*\[^\n\r\]*staticvar2" } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// origin PR debug/30161 // origin PR debug/30161
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// { dg-do compile } // { dg-do compile }
// { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "DW_TAG_template_type_param" } }
// { dg-final { scan-assembler "U.*DW_AT_name" } } // { dg-final { scan-assembler "U.*DW_AT_name" } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// origin PR debug/30161 // origin PR debug/30161
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// { dg-do compile } // { dg-do compile }
// { dg-final { scan-assembler "DW_TAG_template_value_param" } } // { dg-final { scan-assembler "DW_TAG_template_value_param" } }
// { dg-final { scan-assembler "i.*DW_AT_name" } } // { dg-final { scan-assembler "i.*DW_AT_name" } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // 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 "DW_TAG_template_value_param" } }
// { dg-final { scan-assembler "f.*DW_AT_name" } } // { 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" } } */ // { 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" } } */
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // Origin PR debug/30161
// { dg-do compile { target c++11 } } // { dg-do compile { target c++11 } }
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// //
// In theory the compiler instantiates count<int, char, long>, // In theory the compiler instantiates count<int, char, long>,
// count<char, long> and count<long>. In practice, only // count<char, long> and count<long>. In practice, only
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // 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 "DW_TAG_template_type_param" } }
// { dg-final { scan-assembler "T.*DW_AT_name" } } // { dg-final { scan-assembler "T.*DW_AT_name" } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // 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 "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 "\"vector.0\".*?DW_AT_GNU_template_name" 1 } }
// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } } // { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // 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 } } // { dg-do compile { target c++11 } }
// There must be 5 subprograms generated: // There must be 5 subprograms generated:
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// origin PR debug/30161 // origin PR debug/30161
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// { dg-do compile } // { dg-do compile }
// { dg-final { scan-assembler "DW_TAG_template_type_param" } } // { dg-final { scan-assembler "DW_TAG_template_type_param" } }
// { dg-final { scan-assembler "U.*DW_AT_name" } } // { dg-final { scan-assembler "U.*DW_AT_name" } }
......
// Origin PR c++/47291 // Origin PR c++/47291
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// { dg-do compile } // { dg-do compile }
struct S; struct S;
......
// PR c++/54410 // 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 } } // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_type_param" 1 } }
namespace N { namespace N {
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// origin PR debug/30161 // origin PR debug/30161
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// { dg-do compile } // { dg-do compile }
// { dg-final { scan-assembler "DW_TAG_template_value_param" } } // { dg-final { scan-assembler "DW_TAG_template_value_param" } }
// { dg-final { scan-assembler "i.*DW_AT_name" } } // { dg-final { scan-assembler "i.*DW_AT_name" } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // 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 "DW_TAG_template_value_param" } }
// { dg-final { scan-assembler "f.*DW_AT_name" } } // { 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" } } */ // { 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" } } */
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // Origin PR debug/30161
// { dg-do compile { target c++11 } } // { dg-do compile { target c++11 } }
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// //
// In theory the compiler instantiates count<int, char, long>, // In theory the compiler instantiates count<int, char, long>,
// count<char, long> and count<long>. In practice, only // count<char, long> and count<long>. In practice, only
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // 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 "DW_TAG_template_type_param" } }
// { dg-final { scan-assembler "T.*DW_AT_name" } } // { dg-final { scan-assembler "T.*DW_AT_name" } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // 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 "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 "\"vector.0\"\[^\n\]*DW_AT_GNU_template_name" 1 } }
// { dg-final { scan-assembler-times ".ascii \"U.0\"\[^\n\]*DW_AT_name" 1 } } // { dg-final { scan-assembler-times ".ascii \"U.0\"\[^\n\]*DW_AT_name" 1 } }
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161 // Origin PR debug/30161
// { dg-do compile { target c++11 } } // { 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, // 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 // with no DW_AT_name attribute. We don't test the fact that it has no
......
// Origin PR debug/46955 // Origin PR debug/46955
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// { dg-do compile } // { dg-do compile }
struct S { int f; }; struct S { int f; };
......
// Origin PR debug/PR46973 // Origin PR debug/PR46973
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// { dg-do compile } // { dg-do compile }
struct S struct S
......
// Contributed by Dodji Seketeli <dodji@redhat.com> // Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/40705 // 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-do compile }
// { dg-final { scan-assembler-times "DW_TAG_structure_type" 2 } } // { 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 } } // { dg-final { scan-assembler-times "DW_AT_name: \"foo<1u>\"|\"foo<1u>..\"\[^\n\]*DW_AT_name" 1 } }
......
// Origin: PR debug/43628 // 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-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 } } // { 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 } }
......
// Origin: PR debug/44188 // Origin: PR debug/44188
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
// { dg-do compile } // { dg-do compile }
// { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_typedef\\)" 1 } } // { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_typedef\\)" 1 } }
......
// Origin: PR debug/45171 // 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 } // { dg-do compile }
// There should be 2 real instances of byte_size -- one for the // There should be 2 real instances of byte_size -- one for the
......
// Origin: PR debug/46101 // Origin: PR debug/46101
// { dg-options "-g -feliminate-dwarf2-dups" } // { dg-options "-gdwarf-2 -feliminate-dwarf2-dups" }
// { dg-do compile } // { dg-do compile }
typedef struct typedef struct
......
// Origin PR debug/ // Origin PR debug/
// { dg-options "-g -dA" } // { dg-options "-gdwarf-2 -dA" }
class C { class C {
public: public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment