Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / gcc.dg / i386-asm-1.c
bloba23e0a0929828e0f0b91d16819efd93f8c1bd1ca
1 /* PR inline-asm/11676 */
2 /* { dg-do run { target i?86-*-* } } */
3 /* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
4 /* { dg-options "-O2" } */
6 extern void abort (void);
7 static int bar(int x) __asm__("bar") __attribute__((regparm(1)));
8 static int __attribute__((regparm(1), noinline, used))
9 bar(int x)
11 if (x != 0)
12 abort ();
15 static int __attribute__((regparm(1), noinline))
16 foo(int x)
18 x = 0;
19 __asm__ __volatile__("call bar" : "=a"(x) : "a"(x));
22 int main()
24 foo(1);
25 return 0;