Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / torture / harden-cfr-noret-no-nothrow.C
blob62c58cfd406d4cebe9665fa1b989195f9f6124d5
1 /* { dg-do compile } */
2 /* { dg-options "-fharden-control-flow-redundancy -fhardcfr-check-noreturn-calls=nothrow -fdump-tree-hardcfr -ffat-lto-objects" } */
4 /* Check that C++ does NOT make for implicit nothrow in noreturn
5    handling.  */
7 #define ATTR_NOTHROW_OPT
9 #if ! __OPTIMIZE__
10 void __attribute__ ((__noreturn__)) h (void);
11 #endif
13 #include "../../c-c++-common/torture/harden-cfr-noret.c"
15 /* All 3 noreturn calls.  */
16 /* { dg-final { scan-tree-dump-times "Associated cleanup" 3 "hardcfr" } } */
17 /* Out-of-line checks in f.  */
18 /* { dg-final { scan-tree-dump-times "Inserting out-of-line check in block \[0-9]*'s edge to exit" 1 "hardcfr" } } */
19 /* { dg-final { scan-tree-dump-times "Inserting out-of-line check before stmt" 1 "hardcfr" } } */
20 /* { dg-final { scan-tree-dump-times "hardcfr_check" 2 "hardcfr" } } */
21 /* Inline checks in h and h2.  */
22 /* { dg-final { scan-tree-dump-times "Inserting inline check before stmt" 2 "hardcfr" } } */
23 /* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "hardcfr" } } */