re PR tree-optimization/51491 (ccp when converting from alloca should add a CLOBBER to right before __builtin_stack_restore)
2011-12-17 Tom de Vries <tom@codesourcery.com> PR tree-optimization/51491 * gcc.dg/pr51491.c: New test. * gcc.dg/pr51491-2.c: Same. From-SVN: r182433
This commit is contained in:
parent
2f31f742a6
commit
bc958632e5
@ -1,3 +1,9 @@
|
||||
2011-12-17 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR tree-optimization/51491
|
||||
* gcc.dg/pr51491.c: New test.
|
||||
* gcc.dg/pr51491-2.c: Same.
|
||||
|
||||
2011-12-16 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/51416
|
||||
|
34
gcc/testsuite/gcc.dg/pr51491-2.c
Normal file
34
gcc/testsuite/gcc.dg/pr51491-2.c
Normal file
@ -0,0 +1,34 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-ccp1" } */
|
||||
|
||||
int g (int *);
|
||||
|
||||
int
|
||||
f (int n)
|
||||
{
|
||||
int tt = 0;
|
||||
int t = 4;
|
||||
{
|
||||
int a[t
|
||||
+ (tt != 0 ? 6 : 0)
|
||||
];
|
||||
tt = g (a);
|
||||
{
|
||||
int b[n];
|
||||
tt += g (b);
|
||||
if (n > 20)
|
||||
tt += 148 * g (b);
|
||||
tt += b[0];
|
||||
}
|
||||
tt += a[0];
|
||||
}
|
||||
{
|
||||
int a[4];
|
||||
tt += g (a);
|
||||
tt += a[0];
|
||||
}
|
||||
return tt;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "CLOBBER" 2 "ccp1"} } */
|
||||
/* { dg-final { cleanup-treee-dump "ccp1" } } */
|
25
gcc/testsuite/gcc.dg/pr51491.c
Normal file
25
gcc/testsuite/gcc.dg/pr51491.c
Normal file
@ -0,0 +1,25 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-rtl-expand" } */
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-rtl-dump-times "Partition" 1 "expand"} } */
|
||||
/* { dg-final { cleanup-rtl-dump "expand" } } */
|
Loading…
Reference in New Issue
Block a user