aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/fhardened-2.c
blob: 6ac66f9f6b7cbcc308f37c1a0310a4029373a3d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-fhardened -fstack-protector" } */

#ifdef __SSP_STRONG__
# error "-fstack-protector-strong enabled when it should not be"
#endif
#if !defined(__SSP__) && !defined(__hppa__)
# error "-fstack-protector not enabled"
#endif

/* { dg-warning ".-fstack-protector-strong. is not enabled" "" { target *-*-* } 0 } */
/* { dg-warning "._FORTIFY_SOURCE. is not enabled" "" { target *-*-* } 0 } */