1 /* { dg-do run } */ 2 /* { dg-options "-O2" } */ 3 extern void abort (); 4 extern void exit (int); 5 6 int x; 7 8 void foo()9foo() 10 { 11 static int count; 12 count++; 13 if (count > 1) 14 abort (); 15 } 16 17 static inline int frob()18frob () 19 { 20 int a; 21 __asm__ ("mov %1, %0\n\t" : "=r" (a) : "m" (x)); 22 x++; 23 return a; 24 } 25 26 int main()27main () 28 { 29 int i; 30 for (i = 0; i < 10 && frob () == 0; i++) 31 foo(); 32 exit (0); 33 } 34