| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fharden-control-flow-redundancy -fhardcfr-check-noreturn-calls=always -fdump-tree-hardcfr -ffat-lto-objects" } */ |
| 3 |
|
| 4 |
/* Check that C++ does NOT make for implicit nothrow in noreturn |
| 5 |
handling. */ |
| 6 |
|
| 7 |
#include "harden-cfr-noret-no-nothrow.C" |
| 8 |
|
| 9 |
/* All 3 noreturn calls. */ |
| 10 |
/* { dg-final { scan-tree-dump-times "Bypassing cleanup" 3 "hardcfr" } } */ |
| 11 |
/* Out-of-line checks in f. */ |
| 12 |
/* { dg-final { scan-tree-dump-times "Inserting out-of-line check in block \[0-9]*'s edge to exit" 1 "hardcfr" } } */ |
| 13 |
/* { dg-final { scan-tree-dump-times "hardcfr_check" 2 "hardcfr" } } */ |
| 14 |
/* Inline checks in h and h2. */ |
| 15 |
/* { dg-final { scan-tree-dump-times "Inserting inline check before stmt" 2 "hardcfr" } } */ |
| 16 |
/* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "hardcfr" } } */ |