1 /* { dg-do compile } */
2 /* { dg-options "-fharden-control-flow-redundancy -fhardcfr-check-noreturn-calls=always -fno-exceptions -fdump-tree-hardcfr -ffat-lto-objects" } */
3 /* { dg-require-effective-target untyped_assembly } */
5 /* Check that, even enabling all checks before noreturn calls (leaving
6 returning calls enabled), we get checks before __builtin_return without
7 duplication (__builtin_return is both noreturn and a returning call). */
9 #include "harden-cfr-bret.c"
11 /* Out-of-line checking, before both builtin_return and return in f. */
12 /* { dg-final { scan-tree-dump-times "__hardcfr_check" 2 "hardcfr" } } */
13 /* Inline checking before builtin_return in g. */
14 /* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcfr" } } */