2007-05-23 H.J. Lu <hongjiu.lu@intel.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pic-1.c
blob66a18b099e6c12e768f46d7b616d2f02ca55e1bc
1 /* PR target/8340 */
2 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
3 /* { dg-require-effective-target ilp32 } */
4 /* { dg-require-effective-target fpic } */
5 /* { dg-options "-fPIC" } */
7 int foo ()
9 static int a;
11 __asm__ __volatile__ ( /* { dg-error "PIC register" } */
12 "xorl %%ebx, %%ebx\n"
13 "movl %%ebx, %0\n"
14 : "=m" (a)
16 : "%ebx"
19 return a;