| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fharden-control-flow-redundancy -fhardcfr-check-noreturn-calls=always -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 with checking before |
| 5 |
all 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), and before both noreturn calls in main. */ |
| 12 |
/* { dg-final { scan-tree-dump-times "__hardcfr_check" 3 "hardcfr" } } */ |
| 13 |
/* No checking for h (too many blocks). */ |