hppa: Always enable PIE on 64-bit target
[official-gcc.git] / gcc / testsuite / gcc.dg / pic-2.c
blob074684604bc0c9eacd6d34a498968ef78ec037e2
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*-*-* } } */
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
16 #ifdef __PIE__
17 # error __PIE__ is defined!
18 #endif