OSDN Git Service

2007-05-22 H.J. Lu <hongjiu.lu@intel.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / pic-1.c
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" } */
6
7 int foo ()
8 {
9   static int a;
10
11   __asm__ __volatile__ (  /* { dg-error "PIC register" } */
12     "xorl %%ebx, %%ebx\n"
13     "movl %%ebx, %0\n"
14     : "=m" (a)
15     :
16     : "%ebx"
17   );
18
19   return a;
20 }