| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fharden-control-flow-redundancy -fhardcfr-check-noreturn-calls=nothrow -fdump-tree-hardcfr -ffat-lto-objects" } */ |
| 3 |
|
| 4 |
/* Check the noreturn handling of a builtin call with =nothrow. */ |
| 5 |
|
| 6 |
#include "harden-cfr-abrt.c" |
| 7 |
|
| 8 |
/* Out-of-line checking, before both builtin_abort and return in f. */ |
| 9 |
/* { dg-final { scan-tree-dump-times "__hardcfr_check" 2 "hardcfr" } } */ |
| 10 |
/* Inline checking before builtin_abort in g. */ |
| 11 |
/* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcfr" } } */ |