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