Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pic-1.c
blob9b7da4d2e16515a7193df90dc8af6cba946afd88
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" } */
8 /* Test verifies that %ebx is no longer fixed when generating PIC code on i686. */
10 int foo ()
12 static int a;
14 __asm__ __volatile__ (
15 "xorl %%ebx, %%ebx\n"
16 "movl %%ebx, %0\n"
17 : "=m" (a)
19 : "%ebx"
22 return a;