blob: 7fe0bb4a6630743022ea8d66eb9c27194f067823 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
/* { dg-do compile } */
/* { 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" } */
/* Check the instrumentation and the parameters without checking before
noreturn calls. */
#include "harden-cfr.c"
/* Inlined checking thus trap for f. */
/* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcfr" } } */
/* Out-of-line checking for g (param). */
/* { dg-final { scan-tree-dump-times "__hardcfr_check" 1 "hardcfr" } } */
/* No checking for h (too many blocks) or main (no edges to exit block). */
|