// PR c++/113292 // { dg-additional-options "-fmodule-header" } // { dg-module-cmi {} } struct test { static const test& get_instance() { return instance; } static thread_local test instance; }; template struct test_template { static const test_template& get_instance() { return instance; } static thread_local test_template instance; template static const test_template& get_template_instance() { return template_instance; } template static thread_local test_template template_instance; }; template thread_local test_template test_template::instance; template template thread_local test_template test_template::template_instance;