summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/anon3.C
blob: eee7acd820f69a94429a03826ec137775ec65c8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/28370
// { dg-do run }

namespace
{
  template<typename T> struct A { static int *a; };
  template<typename T> int *A<T>::a = 0;
}

int *
foo ()
{
  return A<int>::a;
}

int
main ()
{
  return foo() != 0;
}