1 /* PR target/8340 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target ia32 } */
4 /* { dg-require-effective-target fpic } */
5 /* { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin } } */
6 /* { dg-options "-fPIC" } */
7 
8 /* Test verifies that %ebx is no longer fixed when generating PIC code on i686.  */
9 
foo()10 int foo ()
11 {
12   static int a;
13 
14   __asm__ __volatile__ (
15     "xorl %%ebx, %%ebx\n"
16     "movl %%ebx, %0\n"
17     : "=m" (a)
18     :
19     : "%ebx"
20   );
21 
22   return a;
23 }
24