aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/torture/harden-cfr-abrt-always.c
blob: 26c0f270716276472cf943eea5f07a0c00812a5b (plain)
1
2
3
4
5
6
7
8
9
10
11
/* { dg-do compile } */
/* { dg-options "-fharden-control-flow-redundancy -fhardcfr-check-noreturn-calls=always -fdump-tree-hardcfr -ffat-lto-objects" } */

/* Check the noreturn handling of a builtin call with always.  */

#include "harden-cfr-abrt.c"

/* Out-of-line checking, before both builtin_abort and return in f.  */
/* { dg-final { scan-tree-dump-times "__hardcfr_check" 2 "hardcfr" } } */
/* Inline checking before builtin_abort in g.  */
/* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcfr" } } */