From: John David Anglin Date: Sat, 16 Oct 2010 22:55:58 +0000 (+0000) Subject: backport: pubnames-1.C: Replace ".*" by "\[^\n\]*". X-Git-Tag: releases/gcc-4.4.6~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86515ee1ccbbe298999fc890e45c3cac571f2222;p=thirdparty%2Fgcc.git backport: pubnames-1.C: Replace ".*" by "\[^\n\]*". Backport from mainline 2010-09-04 Andreas Schwab * g++.dg/debug/dwarf2/pubnames-1.C: Replace ".*" by "\[^\n\]*". 2010-07-07 Tom Tromey * g++.dg/debug/dwarf2/pubnames-1.C: Make darwin-specific. 2009-09-08 Dodji Seketeli * 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 052d5738d8dc..7cee93ae0a85 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2010-10-16 John David Anglin + + Backport from mainline + 2010-09-04 Andreas Schwab + * g++.dg/debug/dwarf2/pubnames-1.C: Replace ".*" by "\[^\n\]*". + + 2010-07-07 Tom Tromey + * g++.dg/debug/dwarf2/pubnames-1.C: Make darwin-specific. + + 2009-09-08 Dodji Seketeli + * 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 * gcc.dg/pragma-init-fini.c: Skip on i?86-*-solaris2.8 && !gas. diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C index f5089ca2da81..888484216b7f 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C @@ -1,14 +1,22 @@ // Contributed by Dodji Seketeli // 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; } -