Debian Codegraph @

gcc/testsuite/g++.dg/torture/harden-cfr-noret-never-no-nothrow.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 that C++ does NOT make for implicit nothrow in noreturn
5 handling. Expected results for =never and =nothrow are the same,
6 since the functions are not nothrow. */
7
8 #include "harden-cfr-noret-no-nothrow.C"
9
10 /* All 3 noreturn calls. */
11 /* { dg-final { scan-tree-dump-times "Associated cleanup" 3 "hardcfr" } } */
12 /* Out-of-line checks in f. */
13 /* { dg-final { scan-tree-dump-times "Inserting out-of-line check in block \[0-9]*'s edge to exit" 1 "hardcfr" } } */
14 /* { dg-final { scan-tree-dump-times "Inserting out-of-line check before stmt" 1 "hardcfr" } } */
15 /* { dg-final { scan-tree-dump-times "hardcfr_check" 2 "hardcfr" } } */
16 /* Inline checks in h and h2. */
17 /* { dg-final { scan-tree-dump-times "Inserting inline check before stmt" 2 "hardcfr" } } */
18 /* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "hardcfr" } } */