Debian Codegraph @

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

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