1// PR c++/51930
2// { dg-require-visibility "" }
3// { dg-options "-fvisibility=hidden" }
4// { dg-final { scan-not-hidden "_ZN13template_testI4testE8functionEv" } }
5
6struct test { };
7
8template<typename T>
9struct template_test
10{
11  __attribute__((visibility("default")))
12  void function();
13};
14
15template<typename T>
16void template_test<T>::function() { }
17
18template
19struct __attribute__((visibility("default")))
20template_test<test>;
21