| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target fpic } */ |
| 3 |
/* { dg-options "-fPIC" } */ |
| 4 |
/* { dg-skip-if "__PIC__ is always 1 for MIPS" { mips*-*-* } } */ |
| 5 |
/* { dg-skip-if "__PIE__ is always defined for GCN" { amdgcn*-*-* } } */ |
| 6 |
/* { dg-skip-if "__PIE__ is always defined for hppa64" { hppa*64*-*-* } } */ |
| 7 |
|
| 8 |
#if defined(__CYGWIN__) || defined(__WIN32__) |
| 9 |
# if __PIC__ != 1 |
| 10 |
# error __PIC__ is not 1! |
| 11 |
# endif |
| 12 |
#elif __PIC__ != 2 |
| 13 |
# error __PIC__ is not 2! |
| 14 |
#endif |
| 15 |
|
| 16 |
#ifdef __PIE__ |
| 17 |
# error __PIE__ is defined! |
| 18 |
#endif |