1 /* PR middle-end/23848 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-require-effective-target alloca } */
5 
6 void bar (int, char *, char *, char *, char *, int);
foo(int size)7 void foo (int size)
8 {
9   int i;
10   for (i = 0; i < size; i++)
11     {
12       char temp[size];
13       temp[size-1] = '\0';
14       {
15 	char temp2[size];
16 	{
17 	  char temp3[size];
18 	  {
19 	    char temp4[size];
20 	    bar (i, temp, temp2, temp3, temp4, size);
21 	  }
22 	}
23       }
24     }
25 }
26 
27 /* { dg-final { scan-tree-dump-times "__builtin_stack_save" 1 "optimized"} } */
28 /* { dg-final { scan-tree-dump-times "__builtin_stack_restore" 1 "optimized"} } */
29