Debian Codegraph @

gcc/testsuite/c-c++-common/torture/harden-cfr-never.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fharden-control-flow-redundancy -fhardcfr-check-noreturn-calls=never -fdump-tree-hardcfr --param hardcfr-max-blocks=9 --param hardcfr-max-inline-blocks=5 -ffat-lto-objects -w" } */
3
4 /* Check the instrumentation and the parameters without checking before
5 noreturn calls. */
6
7 #include "harden-cfr.c"
8
9 /* Inlined checking thus trap for f. */
10 /* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcfr" } } */
11 /* Out-of-line checking for g (param). */
12 /* { dg-final { scan-tree-dump-times "__hardcfr_check" 1 "hardcfr" } } */
13 /* No checking for h (too many blocks) or main (no edges to exit block). */