| 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 we don't insert checking before noreturn calls. -O0 is tested |
| 5 |
separately because h is not found to be noreturn without optimization, which |
| 6 |
affects codegen for h2, so h2 is omitted here at -O0. */ |
| 7 |
|
| 8 |
#if !__OPTIMIZE__ |
| 9 |
# define OMIT_H2 |
| 10 |
#endif |
| 11 |
|
| 12 |
#include "harden-cfr-noret.c" |
| 13 |
|
| 14 |
|
| 15 |
/* No out-of-line checks. */ |
| 16 |
/* { dg-final { scan-tree-dump-times "hardcfr_check" 0 "hardcfr" } } */ |
| 17 |
/* Only one inline check at the end of f. */ |
| 18 |
/* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcfr" } } */ |