Fix c-c++-common/fhardened-[12].c test fails on hppa
[official-gcc.git] / gcc / testsuite / c-c++-common / fhardened-2.c
blob6ac66f9f6b7cbcc308f37c1a0310a4029373a3d2
1 /* { dg-do compile { target *-*-linux* *-*-gnu* } } */
2 /* { dg-options "-fhardened -fstack-protector" } */
4 #ifdef __SSP_STRONG__
5 # error "-fstack-protector-strong enabled when it should not be"
6 #endif
7 #if !defined(__SSP__) && !defined(__hppa__)
8 # error "-fstack-protector not enabled"
9 #endif
11 /* { dg-warning ".-fstack-protector-strong. is not enabled" "" { target *-*-* } 0 } */
12 /* { dg-warning "._FORTIFY_SOURCE. is not enabled" "" { target *-*-* } 0 } */