// PR c++/85470 // { dg-do compile { target c++11 } } template struct StaticObject { static T& create() { static T t; return t; } static T & instance; }; template T & StaticObject::instance = StaticObject::create(); extern template class StaticObject; void test() { StaticObject::instance; }