Debian Codegraph @

gcc/testsuite/c-c++-common/torture/harden-cfr-bret-noret.c

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