blob: fc7e30299f686de2f33a7450419c8e02831f8692 [file] [log] [blame]
// PR tree-optimization/56854
// { dg-do compile }
inline void *
operator new (__SIZE_TYPE__, void *p) throw ()
{
return p;
}
struct A
{
int a;
A () : a (0) {}
~A () {}
A &operator= (const A &v) { this->~A (); new (this) A (v); return *this; }
};
A b[4], c[4];
void
foo ()
{
for (int i = 0; i < 4; ++i)
c[i] = b[i];
}