From: Paolo Carlini Date: Tue, 10 Apr 2018 13:40:35 +0000 (+0000) Subject: re PR c++/24314 (Extra "template<>" in partial specialization is compiled successfuly.) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b30ae8037dd891566decdadbde041d8f406ecef6;p=gcc.git re PR c++/24314 (Extra "template<>" in partial specialization is compiled successfuly.) 2018-04-10 Paolo Carlini PR c++/24314 * g++.dg/parse/template29.C: New. From-SVN: r259273 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 11e18865164..80ad244e3e6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-04-10 Paolo Carlini + + PR c++/24314 + * g++.dg/parse/template29.C: New. + 2018-04-10 Bin Cheng PR testsuite/85190 diff --git a/gcc/testsuite/g++.dg/parse/template29.C b/gcc/testsuite/g++.dg/parse/template29.C new file mode 100644 index 00000000000..46033cbe9de --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/template29.C @@ -0,0 +1,31 @@ +// PR c++/24314 + +// The base template. +template +struct A +{ + int select() { return 0; } +}; + +//Extra "template<>" +template <> +template <> +template <> +template <> +template <> +template <> +template <> +template <> +template <> +template <> +template <> +template +struct A // { dg-error "too many template-parameter-lists" } +{ + int select() { return 1; } +}; + +int main() +{ + return A().select(); +}