URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr31146-2.C] - Rev 826
Compare with Previous | Blame | View Log
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-forwprop1" } */
#include <new>
template <class T>
struct Vec
{
Vec()
{
for (int i=0; i<3; ++i)
new (&a[i]) T(0);
}
T a[3];
};
double foo (void)
{
Vec<double> v;
return v.a[2];
}
/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */