2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / init / init-ref4.C
blob26d2e97562ca962220185d34fcb964b955b7dde0
1 // Origin: dgregor@gcc.gnu.org
2 // PR c++/11384
3 // foo<int>::_S_something was not being emitted.
5 // { dg-do run { xfail *-*-aout *-*-coff *-*-hpux* *-*-hms } }
6 // On targets that don't support weak symbols, we require an explicit
8 template<typename T> 
9   struct foo
10   {
11     static const T _S_something;
12   };
14 template<typename T>
15   const T foo<T>::_S_something = T();
17 int main()
19   const int* p = &foo<int>::_S_something;
20   return 0;