Patchwork [testsuite] Fix gcc.dg/debug/dwarf2/pr53948.c with Sun as

login
register
mail settings
Submitter Rainer Orth
Date Feb. 14, 2013, 11:48 a.m.
Message ID <ydd7gmbxgjy.fsf@lokon.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/220426/
State New
Headers show

Comments

Rainer Orth - Feb. 14, 2013, 11:48 a.m.
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> The new gcc.dg/debug/dwarf2/pr53948.c test was failing on Solaris with
> Sun as: i386 uses / as comment character, while sparc uses !.  The
> following patch accounts for that.
>
> Tested on i386-pc-solaris2.10, sparc-sun-solaris2.11, and
> x86_64-unknown-linux-gnu, installed on mainline.

It turned out I need one further adjustment to make the test pass on
i386-pc-solaris2.9, which uses "/ " comments instead of just "/".

Tested with the appropriate runtest invocations on i386-pc-solaris2.9,
i386-pc-solaris2.10, sparc-sun-solaris2.11, and
x86_64-unknown-linux-gnu, installed on mainline.

	Rainer


2013-02-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.dg/debug/dwarf2/pr53948.c: Allow for more whitespace.
Jakub Jelinek - Feb. 14, 2013, 1:49 p.m.
On Thu, Feb 14, 2013 at 12:48:01PM +0100, Rainer Orth wrote:
> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> --- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
> +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
> @@ -1,7 +1,7 @@
>  /* Test that we have line information for the line
>     with local variable initializations.  */
>  /* { dg-options "-O0 -g -dA" } */
> -/* { dg-final { scan-assembler ".loc 1 8 0|\[#/!\] line 8" } } */
> +/* { dg-final { scan-assembler ".loc 1 8 0|\[#/!\]\[ \t\]+line 8" } } */

Given dwarf-char*.c regexps, perhaps that should be
\[#@;!/|\]+\[ \t\]+
instead of
\[#/!\]\[ \t\]+

Quick grep reveals m68k uses | and arm uses @.

	Jakub

Patch

diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
@@ -1,7 +1,7 @@ 
 /* Test that we have line information for the line
    with local variable initializations.  */
 /* { dg-options "-O0 -g -dA" } */
-/* { dg-final { scan-assembler ".loc 1 8 0|\[#/!\] line 8" } } */
+/* { dg-final { scan-assembler ".loc 1 8 0|\[#/!\]\[ \t\]+line 8" } } */
 
 
 int f (register int a, register int b) {