| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fharden-control-flow-redundancy -fdump-tree-hardcfr -ffat-lto-objects" } */ |
| 3 |
|
| 4 |
/* Check the noreturn handling of a builtin call. */ |
| 5 |
|
| 6 |
int f(int i) { |
| 7 |
if (!i) |
| 8 |
__builtin_abort (); |
| 9 |
return i; |
| 10 |
} |
| 11 |
|
| 12 |
int g() { |
| 13 |
__builtin_abort (); |
| 14 |
} |
| 15 |
|
| 16 |
/* Out-of-line checking, before both builtin_abort and return in f. */ |
| 17 |
/* { dg-final { scan-tree-dump-times "__hardcfr_check" 2 "hardcfr" } } */ |
| 18 |
/* Inline checking before builtin_return in g. */ |
| 19 |
/* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcfr" } } */ |