// PR ipa/59947 // { dg-do compile { target c++11 } } // { dg-options "-O0" } #pragma GCC optimize ("O2") template inline void foo (T & a) noexcept { T tmp = static_cast (a); }; struct A { A () noexcept : a (1), b (1) {} virtual void c () noexcept = 0; void d () noexcept { c (); } int a; int b; }; struct B { ~B () noexcept { e->d (); } A *e; }; template struct C { B f; }; struct D {}; template struct E { void bar () { foo (g); } C g; }; template class E ;