Debian Codegraph @

gcc/testsuite/c-c++-common/torture/harden-cfr-noret-nothrow.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fharden-control-flow-redundancy -fhardcfr-check-noreturn-calls=nothrow -fdump-tree-hardcfr -ffat-lto-objects" } */
3
4 /* Check that we insert checking before nothrow noreturn calls. */
5
6 #include "harden-cfr-noret.c"
7
8 /* One out-of-line check before the noreturn call in f, and another at the end
9 of f. */
10 /* { dg-final { scan-tree-dump-times "hardcfr_check" 2 "hardcfr" } } */
11 /* One inline check in h, before the noreturn call, and another in h2, before
12 or after the call, depending on noreturn detection. */
13 /* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "hardcfr" } } */