gcc/testsuite/gcc.target/aarch64/stack-check-13.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-asynchronous-unwind-tables -fno-unwind-tables" } */ |
| 3 | /* { dg-require-effective-target supports_stack_clash_protection } */ |
| 4 | |
| 5 | #define ARG32(X) X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X |
| 6 | #define ARG192(X) ARG32(X),ARG32(X),ARG32(X),ARG32(X),ARG32(X),ARG32(X) |
| 7 | void out1(ARG192(__int128)); |
| 8 | int t1(int); |
| 9 | |
| 10 | int t3(int x) |
| 11 | { |
| 12 | if (x < 1000) |
| 13 | return t1 (x) + 1; |
| 14 | |
| 15 | out1 (ARG192(1)); |
| 16 | return 0; |
| 17 | } |
| 18 | |
| 19 | |
| 20 | |
| 21 | /* This test creates a large (> 1k) outgoing argument area that needs |
| 22 | to be probed. We don't test the exact size of the space or the |
| 23 | exact offset to make the test a little less sensitive to trivial |
| 24 | output changes. */ |
| 25 | /* { dg-final { scan-assembler-times "sub\\tsp, sp, #....\\n\\tstr\\txzr, \\\[sp" 1 } } */ |
| 26 | |
| 27 | |
| 28 |