Commit 886ca18f by Michael Matz

20000724-1.c: Add regparm attribute to decl and def.

        * gcc.dg/20000724-1.c: Add regparm attribute to decl and def.
        * gcc.dg/991214-1.c: Likewise.
        * gcc.dg/i386-asm-1.c: Likewise.

From-SVN: r78500
parent cec0e70b
...@@ -22,7 +22,7 @@ int baz(void *x) ...@@ -22,7 +22,7 @@ int baz(void *x)
void do_check (struct s *) asm ("do_check") __attribute__((regparm(1))); 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) if (x->a.a || x->b || x->c.a.a)
abort(); abort();
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/* Test against a problem with the combiner substituting explicit hard reg /* Test against a problem with the combiner substituting explicit hard reg
references when it shouldn't. */ references when it shouldn't. */
void foo (int, int) __attribute__ ((regparm (3))); 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)); __asm__ __volatile__("" : : "d" (x), "r" (y));
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-do run { target i?86-*-* } } */ /* { dg-do run { target i?86-*-* } } */
/* { dg-options "-O2" } */ /* { 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)) static int __attribute__((regparm(1), noinline, used))
bar(int x) bar(int x)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment