1 // PR c++/35688 2 // { dg-require-visibility "" } 3 // { dg-options "-fvisibility=hidden" } 4 5 // { dg-final { scan-hidden "_ZN1s6vectorI1AEC1Ev" } } 6 // { dg-final { scan-hidden "_ZN1s3fooI1AEEvT_" } } 7 8 namespace s __attribute__((visibility("default"))) { 9 template <class T> 10 class vector { 11 public: vector()12 vector() { } 13 }; 14 template <class T> foo(T t)15 void foo(T t) { 16 } 17 } 18 19 class A { 20 public: A()21 A() { } 22 }; 23 24 s::vector<A> v; 25 main()26int main() { 27 A a; 28 s::foo(a); 29 } 30