Debian Codegraph @

gcc/testsuite/g++.dg/torture/harden-cfr-throw-no-xthrow-expected.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fharden-control-flow-redundancy -fno-hardcfr-check-returning-calls -fhardcfr-check-noreturn-calls=no-xthrow -fdump-tree-hardcfr -ffat-lto-objects" } */
3
4 /* Check that we insert cleanups for checking around the bodies of
5 maybe-throwing functions, and also checking before noreturn
6 calls. */
7
8 extern void __attribute__ ((__noreturn__, __expected_throw__)) g (void);
9 extern void __attribute__ ((__noreturn__, __expected_throw__)) g2 (void);
10
11 #include "harden-cfr-throw.C"
12
13 /* In f and h3, there are checkpoints at return and exception escape. . */
14 /* { dg-final { scan-tree-dump-times "hardcfr_check" 4 "hardcfr" } } */
15 /* Other functions get a single cleanup checkpoint. */
16 /* { dg-final { scan-tree-dump-times "builtin_trap" 5 "hardcfr" } } */