// PR c++/12316 // Origin: Volker Reichelt // { dg-do compile } // { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } inline void FOO() {} template struct A { A() {} ~A() throw() {} }; template struct B { static void foo(); static void bar() { foo(); } }; struct C {}; template struct D : C { D() {} ~D() { B::bar(); } }; template struct E : D { static void baz() {} E(A) { baz(); } }; void BAR() { new E(A()); }