// PR c++/97918 // { dg-do compile { target c++11 } } // { dg-require-effective-target lto } // { dg-additional-options "-g -O -flto" } namespace { class A {}; } class B {}; template struct H { constexpr static unsigned h = 0; }; template A bar () { struct J { static void foo(); }; H(); return A (); } void fn () { bar; // only mentions the function }