1// PR c++/27000
2// Implicitly instantiated templates should not be affected by
3// #pragma visibility.
4
5/* { dg-do compile } */
6/* { dg-require-visibility "" } */
7/* { dg-final { scan-not-hidden "_ZN1SIiED1Ev" } } */
8/* { dg-final { scan-not-hidden "_ZN1SIiEC1ERKi" } } */
9
10template <class T>
11struct S
12{
13  S (const T &);
14  ~S ();
15  T t;
16};
17
18template <class T>
19S<T>::S (const T &x)
20{
21  t = x;
22}
23
24template <class T>
25S<T>::~S ()
26{
27}
28
29#pragma GCC visibility push(hidden)
30struct U
31{
32  S<int> s;
33  U () : s (6) { }
34} u;
35#pragma GCC visibility pop
36