gcc/testsuite/c-c++-common/fhardened-10.c
raw| 1 | /* { dg-do compile { target *-*-linux* *-*-gnu* } } */ |
| 2 | /* { dg-options "-fhardened -D_FORTIFY_SOURCE=1" } */ |
| 3 | |
| 4 | #if _FORTIFY_SOURCE != 1 |
| 5 | # error "_FORTIFY_SOURCE != 1" |
| 6 | #endif |
| 7 | |
| 8 | #ifndef _GLIBCXX_ASSERTIONS |
| 9 | # error "_GLIBCXX_ASSERTIONS disabled when it should not be" |
| 10 | #endif |
| 11 | |
| 12 | /* { dg-warning "._FORTIFY_SOURCE. is not enabled" "" { target *-*-* } 0 } */ |