]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: pubnames-1.C: Replace ".*" by "\[^\n\]*".
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Sat, 16 Oct 2010 22:55:58 +0000 (22:55 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 16 Oct 2010 22:55:58 +0000 (22:55 +0000)
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

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C

index 052d5738d8dc4f95bb192ac10df42c8a7dd3d6cd..7cee93ae0a85e8a8bdb9c8877ba29e8029c73b09 100644 (file)
@@ -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.
index f5089ca2da81af1e0449ee3674d5e020b36c3294..888484216b7f1a907889fbcad754afd6a842e9f6 100644 (file)
@@ -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; }
-