PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / stack-check-19.c
blobb92c126d57f72ad147a72aff23fb6de8bd2fc8b9
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand" } */
3 /* { dg-require-effective-target supports_stack_clash_protection } */
5 int f1 (char *);
7 int
8 f2 (const int size)
10 char buffer[size];
11 return f1 (buffer);
14 /* So we want to verify that at expand time that we probed the main
15 VLA allocation as well as the residuals. Then we want to verify
16 there are two probes in the final assembly code. */
17 /* { dg-final { scan-rtl-dump-times "allocation and probing in loop" 1 "expand" } } */
18 /* { dg-final { scan-rtl-dump-times "allocation and probing residuals" 1 "expand" } } */
19 /* { dg-final { scan-assembler-times "or\[ql\]" 2 } } */
21 /* We also want to verify (indirectly) that the residual probe is
22 guarded. We do that by checking the number of conditional
23 branches. There should be 3. One that bypasses the probe loop, one
24 in the probe loop and one that bypasses the residual probe.
26 These will all be equality tests. */
27 /* { dg-final { scan-assembler-times "(\?:je|jne)" 3 } } */