diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/pr28284.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/pr28284.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/pr28284.C b/gcc/testsuite/g++.dg/template/pr28284.C new file mode 100644 index 000000000..7ef9aa12b --- /dev/null +++ b/gcc/testsuite/g++.dg/template/pr28284.C @@ -0,0 +1,12 @@ +/* { dg-do compile } */ + +template<int> struct A +{ + static const int i=x; /* { dg-error "was not declared in this scope" } */ + static const int j, k; +}; + +template<int N> const int A<N>::j = i; +template<int N> const int A<N>::k = j; + +A<0> a; |