diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/error50.C')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/error50.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/error50.C b/gcc/testsuite/g++.dg/parse/error50.C new file mode 100644 index 0000000000..dbd8958c36 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/error50.C @@ -0,0 +1,18 @@ +// PR c++/18747 + +template<> int i; // { dg-error "template" } + +struct A +{ + static int i; +}; + +template<> int A::i; // { dg-error "template" } + +template <class T> +struct B +{ + static T i; +}; + +template<> template <> int B<int>::i; // { dg-error "should be 1" } |