OSDN Git Service

aae0de845b30b540ce42d9925fb3d833c7371966
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / i386-asm-1.c
1 /* PR inline-asm/11676 */
2 /* { dg-do run { target i?86-*-* } } */
3 /* { dg-options "-O2" } */
4
5 static int bar(int x) __asm__("bar");
6 static int __attribute__((regparm(1), noinline, used))
7 bar(int x)
8 {
9   if (x != 0)
10     abort ();
11 }
12
13 static int __attribute__((regparm(1), noinline))
14 foo(int x)
15 {
16   x = 0;
17   __asm__ __volatile__("call bar" : "=a"(x) : "a"(x));
18 }
19
20 int main()
21 {
22   foo(1);
23   return 0;
24 }