gcc/testsuite/gcc.c-torture/execute/pr47237.c
raw| 1 | /* { dg-xfail-run-if "can cause stack underflow" { amdgcn-*-* } } */ |
| 2 | /* { dg-require-effective-target untyped_assembly } */ |
| 3 | #define INTEGER_ARG 5 |
| 4 | |
| 5 | extern void abort(void); |
| 6 | |
| 7 | static void foo(int arg) |
| 8 | { |
| 9 | if (arg != INTEGER_ARG) |
| 10 | abort(); |
| 11 | } |
| 12 | |
| 13 | static void bar(int arg) |
| 14 | { |
| 15 | foo(arg); |
| 16 | __builtin_apply(foo, __builtin_apply_args(), 16); |
| 17 | } |
| 18 | |
| 19 | int main(void) |
| 20 | { |
| 21 | bar(INTEGER_ARG); |
| 22 | |
| 23 | return 0; |
| 24 | } |