blob: c80ed85e8302fd0d7fe4d9a3b86199bcc8e5bd2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* PR middle-end/23848 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
void bar1 (char *, int);
void foo1 (int size)
{
char temp[size];
temp[size-1] = '\0';
bar1 (temp, size);
}
void bar2 (char *, char *, char *, char *, int);
void foo2 (int size)
{
char temp[size];
temp[size-1] = '\0';
{
char temp2[size];
{
char temp3[size];
{
char temp4[size];
bar2 (temp, temp2, temp3, temp4, size);
}
}
}
}
/* { dg-final { scan-tree-dump-not "__builtin_stack_save" "optimized"} } */
/* { dg-final { scan-tree-dump-not "__builtin_stack_restore" "optimized"} } */
|