http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51491
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-12
19:51:32 UTC ---
The testcase which I referenced in the bug report is one where it shows adding
a CLOBBER is a good idea. Anyways the following two functions should produce
the same exact code:
int g(int*);
int f(void)
{
int tt = 0;
int t = 4;
{
int a[t];
tt = g(a);
tt += a[0];
}
{
int a[4];
tt += g(a);
tt += a[0];
}
return tt;
}
int f1(void)
{
int tt = 0;
int t = 4;
{
int a[4];
tt = g(a);
tt += a[0];
}
{
int a[4];
tt += g(a);
tt += a[0];
}
return tt;
}
--- CUT ---
Currently without adding the CLOBBER, f's stack size is much bigger than f1's.