gcc/testsuite/g++.dg/modules/tls-1_b.C
raw| 1 | // PR c++/113292 |
| 2 | // { dg-additional-options "-fmodules-ts" } |
| 3 | |
| 4 | import "tls-1_a.H"; |
| 5 | |
| 6 | // provide a definition of 'instance' so things link |
| 7 | thread_local test test::instance; |
| 8 | |
| 9 | void instantiate() { |
| 10 | auto& instance = test::get_instance(); |
| 11 | auto& t_instance = test_template<int>::get_instance(); |
| 12 | auto& tt_instance = test_template<int>::get_template_instance<double>(); |
| 13 | }; |