This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix regparm testcases
- From: Michael Matz <matz at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Feb 2004 12:11:38 +0100 (CET)
- Subject: fix regparm testcases
Hi,
my patch for checking regparm attribute matching for different function
decls triggered some errors in the testsuite, which I didn't notice
because I've run the testsuite only on amd64. Not very clever for a
feature of this nature :-/
The below patch fixes them. Okay? (tested on 3.4 and head on i686 this
time ;) )
Ciao,
Michael.
--
* gcc.dg/20000724-1.c: Fix regparm attribute.
* gcc.dg/991214-1.c: Likewise.
* gcc.dg/i386-asm-1.c: Likewise.
Index: testsuite/gcc.dg/20000724-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20000724-1.c,v
retrieving revision 1.4
diff -u -p -r1.4 20000724-1.c
--- testsuite/gcc.dg/20000724-1.c 30 Apr 2001 23:28:23 -0000 1.4
+++ testsuite/gcc.dg/20000724-1.c 25 Feb 2004 10:51:59 -0000
@@ -22,7 +22,7 @@ int baz(void *x)
void do_check (struct s *) asm ("do_check") __attribute__((regparm(1)));
-void do_check(struct s *x)
+void __attribute__((regparm(1))) do_check(struct s *x)
{
if (x->a.a || x->b || x->c.a.a)
abort();
Index: testsuite/gcc.dg/991214-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/991214-1.c,v
retrieving revision 1.3
diff -u -p -r1.3 991214-1.c
--- testsuite/gcc.dg/991214-1.c 6 Feb 2002 20:40:17 -0000 1.3
+++ testsuite/gcc.dg/991214-1.c 25 Feb 2004 10:51:59 -0000
@@ -4,7 +4,7 @@
/* Test against a problem with the combiner substituting explicit hard reg
references when it shouldn't. */
void foo (int, int) __attribute__ ((regparm (3)));
-void foo (int x, int y)
+void __attribute__((regparm(3))) foo (int x, int y)
{
__asm__ __volatile__("" : : "d" (x), "r" (y));
}
Index: testsuite/gcc.dg/i386-asm-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/i386-asm-1.c,v
retrieving revision 1.1
diff -u -p -r1.1 i386-asm-1.c
--- testsuite/gcc.dg/i386-asm-1.c 26 Jul 2003 15:53:14 -0000 1.1
+++ testsuite/gcc.dg/i386-asm-1.c 25 Feb 2004 10:51:59 -0000
@@ -2,7 +2,7 @@
/* { dg-do run { target i?86-*-* } } */
/* { dg-options "-O2" } */
-static int bar(int x) __asm__("bar");
+static int bar(int x) __asm__("bar") __attribute__((regparm(1)));
static int __attribute__((regparm(1), noinline, used))
bar(int x)
{