backport: pubnames-1.C: Replace ".*" by "\[^\n\]*".
Backport from mainline 2010-09-04 Andreas Schwab <schwab@linux-m68k.org> * g++.dg/debug/dwarf2/pubnames-1.C: Replace ".*" by "\[^\n\]*". 2010-07-07 Tom Tromey <tromey@redhat.com> * g++.dg/debug/dwarf2/pubnames-1.C: Make darwin-specific. 2009-09-08 Dodji Seketeli <dodji@redhat.com> * g++.dg/debug/dwarf2/pubnames-1.C: Use -fno-merge-debug-string and adjust. Also, adjust to take darwin specifics in account. From-SVN: r165567
This commit is contained in:
parent
9d89ebe1b9
commit
86515ee1cc
|
@ -1,3 +1,16 @@
|
|||
2010-10-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
Backport from mainline
|
||||
2010-09-04 Andreas Schwab <schwab@linux-m68k.org>
|
||||
* g++.dg/debug/dwarf2/pubnames-1.C: Replace ".*" by "\[^\n\]*".
|
||||
|
||||
2010-07-07 Tom Tromey <tromey@redhat.com>
|
||||
* g++.dg/debug/dwarf2/pubnames-1.C: Make darwin-specific.
|
||||
|
||||
2009-09-08 Dodji Seketeli <dodji@redhat.com>
|
||||
* g++.dg/debug/dwarf2/pubnames-1.C: Use -fno-merge-debug-string
|
||||
and adjust. Also, adjust to take darwin specifics in account.
|
||||
|
||||
2010-10-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* gcc.dg/pragma-init-fini.c: Skip on i?86-*-solaris2.8 && !gas.
|
||||
|
|
|
@ -1,14 +1,22 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR debug/39706
|
||||
// { dg-options "-g -dA" }
|
||||
// { dg-do compile }
|
||||
// { dg-final { scan-assembler-times ".debug_pubnames" 1 } }
|
||||
// { dg-final { scan-assembler-times "\"main\".*external name" 1 } }
|
||||
// { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } }
|
||||
// { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } }
|
||||
// { dg-do compile { target *-*-darwin* } }
|
||||
// { dg-options "-g -dA -fno-merge-debug-strings" }
|
||||
//
|
||||
// There should be one debug_pubnames section generated.
|
||||
// On Darwin though, there is also a label pointing at the begining of the
|
||||
// debug_pubnames section. The assembly code of that label adds an occurence
|
||||
// of section declaration assembly. So on Darwin, we need to check for two
|
||||
// occurences of the debug_pubnames section declaration.
|
||||
// { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 1 { target { ! *-*-darwin* } } } }
|
||||
// { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 2 { target { *-*-darwin* } } } }
|
||||
//
|
||||
// Then check of the presence of the names we are interested in.
|
||||
// { dg-final { scan-assembler-times "\"main.0\"\[^\n\]*external name" 1 } }
|
||||
// { dg-final { scan-assembler-times "\"ns::ns_x\[^\n\]*external name" 1 } }
|
||||
// { dg-final { scan-assembler-times "\"y::y_x\[^\n\]*external name" 1 } }
|
||||
|
||||
namespace ns { int ns_x; }
|
||||
class y { public: static int y_x; };
|
||||
int y::y_x;
|
||||
int main() { return ns::ns_x; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue