Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/stack-check-prologue-15.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-stack-protector" } */
3 /* { dg-require-effective-target supports_stack_clash_protection } */
4
5 void g (volatile int *x) ;
6 void h (void) __attribute__ ((noreturn));
7
8 void
9 f (void)
10 {
11 volatile int x[16384 + 1000];
12 g (x);
13 h ();
14 }
15
16 /* { dg-final { scan-assembler-times {str\s+xzr, \[sp, 1024\]} 1 } } */
17 /* { dg-final { scan-assembler-times {str\s+x30, \[sp\]} 1 } } */
18
19 /* SIZE is more than 1 guard-size, two 64k pages used, expect only 1 explicit
20 probe at 1024 and one implicit probe due to LR being saved. Leaf function
21 and omitting leaf pointers, normal function call followed by a tail call to
22 noreturn which may only omit an epilogue and not a prologue and control flow
23 in between. Checking for LR saving. */