PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr23848-4.c
blob0f7948c3e14cc6d05977d5dfb0760e0c61af1804
1 /* PR middle-end/23848 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-require-effective-target alloca } */
6 void bar (char *, char *, char *, char *, int);
7 void foo (int size)
9 char temp[size];
10 temp[size-1] = '\0';
12 char temp2[size];
14 char temp3[size];
16 char temp4[size];
17 bar (temp, temp2, temp3, temp4, size);
20 __asm __volatile ("" : : "r" (&temp[0]), "r" (&temp2[0]) : "memory");
24 /* { dg-final { scan-tree-dump-times "__builtin_stack_save" 1 "optimized"} } */
25 /* { dg-final { scan-tree-dump-times "__builtin_stack_restore" 1 "optimized"} } */