This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix spurious testsuite failure on SPARC
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 26 Jan 2004 08:50:04 +0100
- Subject: Fix spurious testsuite failure on SPARC
The testcase gcc.dg/sparc-ret.c fails on sparc-*-* with -m64 because the
command line passed to the compiler contains "-m32 -m64".
The test is pure 32-bit so it shouldn't try to use the multiarch capability
to ensure that it is run only in 32-bit mode. Fixed thusly.
2004-01-26 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/sparc-ret.c: Run only in 32-bit mode. Don't scan
the assembly output if -m64 is passed.
--
Eric Botcazou
Index: gcc.dg/sparc-ret.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/sparc-ret.c,v
retrieving revision 1.1
diff -u -p -r1.1 sparc-ret.c
--- gcc.dg/sparc-ret.c 7 Dec 2001 21:51:04 -0000 1.1
+++ gcc.dg/sparc-ret.c 26 Jan 2004 07:20:25 -0000
@@ -3,8 +3,8 @@
Making sure that Ultrasparc return instructions do not read
below the stack. */
-/* { dg-do compile { target sparc*-*-* } } */
-/* { dg-options "-mcpu=ultrasparc -O -m32" } */
+/* { dg-do compile { target sparc-*-* } } */
+/* { dg-options "-mcpu=ultrasparc -O" } */
int bar (int a, int b, int c, int d, int e, int f, int g, int h)
@@ -14,7 +14,7 @@ int bar (int a, int b, int c, int d, int
toto (&res);
return h;
}
-/* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*ld\[ \t\]*\\\[%sp\\+96\\\]" } } */
+/* { dg-final { global compiler_flags; if ![string match "*-m64 *" $compiler_flags] { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*ld\[ \t\]*\\\[%sp\\+96\\\]" } } } */
int bar2 ()
{
@@ -23,5 +23,4 @@ int bar2 ()
toto (&res);
return res;
}
-/* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*nop" } } */
-
+/* { dg-final { global compiler_flags; if ![string match "*-m64 *" $compiler_flags] { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*nop" } } } */