1 /* Make sure a stack probe is emitted also for the remaining bytes
2 after the loop probing the large chunk. */
3
4 /* { dg-do compile } */
5 /* { dg-options "-O2 -march=z9-ec -fstack-clash-protection" } */
6
7 void large_stack() {
8 volatile int stack[8000];
9 int i;
10 for (i = 0; i < sizeof(stack) / sizeof(int); ++i)
11 stack[i] = i;
12 }
13
14 /* We use a compare for the stack probe. There needs to be one inside
15 a loop and another for the remaining bytes. */
16 /* { dg-final { scan-assembler-times "cg\t" 2 { target s390_zarch } } } */
17 /* { dg-final { scan-assembler-times "c\t" 2 { target { ! s390_zarch } } } } */