gcc/testsuite/c-c++-common/torture/harden-cfr-abrt-never.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fharden-control-flow-redundancy -fhardcfr-check-noreturn-calls=never -fdump-tree-hardcfr -ffat-lto-objects" } */ |
| 3 | |
| 4 | /* Check the noreturn handling of a builtin call with never. */ |
| 5 | |
| 6 | #include "harden-cfr-abrt.c" |
| 7 | |
| 8 | /* No out-of-line checking. */ |
| 9 | /* { dg-final { scan-tree-dump-times "__hardcfr_check" 0 "hardcfr" } } */ |
| 10 | /* Inline checking only before return in f. */ |
| 11 | /* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcfr" } } */ |