1 // PR tree-optimization/56854
2 // { dg-do compile }
3 
4 inline void *
new(__SIZE_TYPE__,void * p)5 operator new (__SIZE_TYPE__, void *p) throw ()
6 {
7   return p;
8 }
9 
10 struct A
11 {
12   int a;
AA13   A () : a (0) {}
~AA14   ~A () {}
15   A &operator= (const A &v) { this->~A (); new (this) A (v); return *this; }
16 };
17 A b[4], c[4];
18 
19 void
foo()20 foo ()
21 {
22   for (int i = 0; i < 4; ++i)
23     c[i] = b[i];
24 }
25