Patchwork [testsuite] Allow for / comments in g++.dg/debug/dwarf2/pubnames-2.C

login
register
mail settings
Submitter Rainer Orth
Date July 11, 2012, 3:11 p.m.
Message ID <ydda9z6bae1.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/170478/
State New
Headers show

Comments

Rainer Orth - July 11, 2012, 3:11 p.m.
g++.dg/debug/dwarf2/pubnames-2.C currently FAILs on Solaris/x86 since
comments start with /, not # for both Sun as and gas.  The following
patch fixes this by allowing the alternate comment character.

Tested with the appropriate runtest invocation on i386-pc-solaris2.11
and x86_64-unknown-linux-gnu, installed on mainline.

	Rainer


2012-07-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* g++.dg/debug/dwarf2/pubnames-2.C: Allow for / comments.
Andreas Schwab - July 11, 2012, 4:30 p.m.
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> g++.dg/debug/dwarf2/pubnames-2.C currently FAILs on Solaris/x86 since
> comments start with /, not # for both Sun as and gas.  The following
> patch fixes this by allowing the alternate comment character.

Do we have to repeat this for every new test that scans the assembler
output?

> 	* g++.dg/debug/dwarf2/pubnames-2.C: Allow for / comments.

Please also add | for m68k and @ for arm.  Don't you want ! as well?

Andreas.
Mike Stump - July 11, 2012, 5:14 p.m.
On Jul 11, 2012, at 9:30 AM, Andreas Schwab wrote:

> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> 
>> g++.dg/debug/dwarf2/pubnames-2.C currently FAILs on Solaris/x86 since
>> comments start with /, not # for both Sun as and gas.  The following
>> patch fixes this by allowing the alternate comment character.
> 
> Do we have to repeat this for every new test that scans the assembler
> output?
> 
>> 	* g++.dg/debug/dwarf2/pubnames-2.C: Allow for / comments.
> 
> Please also add | for m68k and @ for arm.  Don't you want ! as well?

I've been known to use . (regexp for any character) in patterns, on the grounds that all ports known to me use a single character for the comment character, but, vms is likely to use something I can't predict.  :-)

Patch

# HG changeset patch
# Parent 50c8f2aefc6964a7b981ed52d3384bbfbc40b1e7
Allow for / comments in g++.dg/debug/dwarf2/pubnames-2.C

diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C
@@ -1,63 +1,63 @@ 
 // { dg-do compile }
 // { dg-options "-gpubnames -gdwarf-4 -std=c++0x -dA" }
 // { dg-final { scan-assembler ".section\t.debug_pubnames" } }
-// { dg-final { scan-assembler "\"\\(anonymous namespace\\)\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::G_A\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::G_B\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::G_C\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::\\(anonymous namespace\\)\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"F_A\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"F_B\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"F_C\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"inline_func_1\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::c1::c1\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::c1::~c1\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::c1::val\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"check_enum\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"main\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int>::c2\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<double>::c2\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int const\\\*>::c2\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"check<one::c1>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"check<two::c2<int> \\>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"check<two::c2<double> \\>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"check<two::c2<int const\\\*> \\>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int>::val\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<double>::val\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int const\\\*>::val\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"__static_initialization_and_destruction_0\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int>::~c2\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<double>::~c2\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int const\\\*>::~c2\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"_GLOBAL__sub_I__ZN3one3c1vE\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"anonymous_union_var\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::ci\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2v1\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2v2\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2v3\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::c1v\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::\\(anonymous namespace\\)::one_anonymous_var\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::c1_count\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::c2_count\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::three\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::three::anonymous_three_var\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G_A\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G_B\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G_C\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::\\(anonymous namespace\\)\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F_A\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F_B\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F_C\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"inline_func_1\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1::c1\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1::~c1\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1::val\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check_enum\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"main\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>::c2\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>::c2\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>::c2\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<one::c1>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<two::c2<int> \\>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<two::c2<double> \\>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<two::c2<int const\\\*> \\>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>::val\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>::val\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>::val\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"__static_initialization_and_destruction_0\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>::~c2\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>::~c2\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>::~c2\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"_GLOBAL__sub_I__ZN3one3c1vE\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"anonymous_union_var\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::ci\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2v1\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2v2\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2v3\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1v\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::\\(anonymous namespace\\)::one_anonymous_var\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::c1_count\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::c2_count\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::three\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::three::anonymous_three_var\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
 // { dg-final { scan-assembler ".section\t.debug_pubtypes" } }
-// { dg-final { scan-assembler "\"one::G\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::c1\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"int\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"one::c1\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<double>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"double\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<double>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int const\\\*>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"two::c2<int const\\\*>\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"F\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"anonymous_union_container\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
-// { dg-final { scan-assembler "\"bool\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"int\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"double\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"anonymous_union_container\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"bool\\\\0\"+\[ \t\]+\[#;/]+\[ \t\]+external name" } }
 
 namespace
 {