1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
3 /* { dg-require-effective-target supports_stack_clash_protection } */
4 /* { dg-require-effective-target alloca } */
5
6 #define SIZE y
7 #include "stack-check-alloca.h"
8
9 /* { dg-final { scan-assembler-times {str\s+xzr, \[sp, 1024\]} 2 } } */
10 /* { dg-final { scan-assembler-times {str\s+xzr, \[sp\]} 1 } } */
11
12 /* Dynamic alloca, expect loop, and 2 probes with 1kB offset and 1 at sp.
13 1st probe is inside the loop for the full guard-size allocations, second
14 probe is for the case where residual is zero and the final probe for when
15 residiual is > 1024 bytes. */