diff mbox

[testsuite] Fix g++.dg/debug/dwarf2/nested-2.C regex for Solaris 2

Message ID 201009021622.49605.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou Sept. 2, 2010, 2:22 p.m. UTC
> g++.dg/debug/dwarf2/nested-2.C is currently FAILing on Solaris 2, both
> SPARC and x86.  Some investigation revealed that this happens because it
> uses a single / for ASM_COMMENT_START, not # or //.  The following patch
> accounts for that.

It doesn't work on the SPARC though because the delimiter is different:

sparc.h:#define ASM_COMMENT_START "!"

Tested on sparc-sun-solaris2.10 and x86_64-suse-linux, applied.


	* g++.dg/debug/dwarf2/nested-2.C: Allow for ! as comment delimiter.

Comments

Rainer Orth Sept. 3, 2010, 3:15 p.m. UTC | #1
Eric Botcazou <ebotcazou@adacore.com> writes:

>> g++.dg/debug/dwarf2/nested-2.C is currently FAILing on Solaris 2, both
>> SPARC and x86.  Some investigation revealed that this happens because it
>> uses a single / for ASM_COMMENT_START, not # or //.  The following patch
>> accounts for that.
>
> It doesn't work on the SPARC though because the delimiter is different:
>
> sparc.h:#define ASM_COMMENT_START "!"
>
> Tested on sparc-sun-solaris2.10 and x86_64-suse-linux, applied.
>
>
> 	* g++.dg/debug/dwarf2/nested-2.C: Allow for ! as comment delimiter.

I admit not having tested on Solaris/SPARC, but could have sworn to have
checked for ASM_COMMENT_START in sparc headers.  Oh well...

Thanks for fixing this.

	Rainer
diff mbox

Patch

Index: g++.dg/debug/dwarf2/nested-2.C
===================================================================
--- g++.dg/debug/dwarf2/nested-2.C	(revision 163745)
+++ g++.dg/debug/dwarf2/nested-2.C	(working copy)
@@ -32,6 +32,6 @@  We want to express that the DIE of S::T<
 
 Hence the slightly odd regexp:
 
-  { dg-final { scan-assembler "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"S\\\\0\"\[ \t\]+\(#|//?\)\[ \t\]+DW_AT_name\[\n\r\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"T<int>\\\\0\"\[ \t\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_template_type_param\\)\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\(#|//?\)\[ \t\]+end of children of DIE\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of children of DIE\[^\n\r\]*" } }
+  { dg-final { scan-assembler "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"S\\\\0\"\[ \t\]+\(#|!|//?\)\[ \t\]+DW_AT_name\[\n\r\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"T<int>\\\\0\"\[ \t\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_template_type_param\\)\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\(#|!|//?\)\[ \t\]+end of children of DIE\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of children of DIE\[^\n\r\]*" } }
 
  */