c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / c-c++-common / torture / harden-cfr-bret.c
blobb6630a6c8669512817bc68b02095ed6ba27cf2d4
1 /* { dg-do compile } */
2 /* { dg-options "-fharden-control-flow-redundancy -fno-exceptions -fdump-tree-hardcfr -ffat-lto-objects" } */
3 /* { dg-require-effective-target untyped_assembly } */
5 extern int foobar (void);
7 #if __cplusplus
8 typedef void (*fnt)(...);
9 #else
10 typedef void (*fnt)();
11 #endif
13 int i;
15 int f(void) {
16 if (i)
17 __builtin_return (__builtin_apply ((fnt)foobar,
18 __builtin_apply_args (), 0));
19 return i;
22 int g(void) {
23 __builtin_return (__builtin_apply ((fnt)foobar,
24 __builtin_apply_args (), 0));
27 /* Out-of-line checking, before both builtin_return and return in f. */
28 /* { dg-final { scan-tree-dump-times "__hardcfr_check" 2 "hardcfr" } } */
29 /* Inline checking before builtin_return in g. */
30 /* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcfr" } } */