From: Paolo Carlini Date: Tue, 4 Aug 2015 11:05:02 +0000 (+0000) Subject: re PR c++/66427 (The compiler rejects too complex variable templates) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01003b83810cbaff81d9a7c00947afa725cbbe9a;p=gcc.git re PR c++/66427 (The compiler rejects too complex variable templates) 2015-08-04 Paolo Carlini PR c++/66427 * g++.dg/cpp1y/var-templ34.C: New. From-SVN: r226568 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 37b41687aba..fb22e07ed6e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-08-04 Paolo Carlini + + PR c++/66427 + * g++.dg/cpp1y/var-templ34.C: New. + 2015-08-04 Kyrylo Tkachov * gcc.target/aarch64/pragma_cpp_predefs_1.c: New test. diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ34.C b/gcc/testsuite/g++.dg/cpp1y/var-templ34.C new file mode 100644 index 00000000000..0c39dd90e69 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ34.C @@ -0,0 +1,20 @@ +// PR c++/66427 +// { dg-do compile { target c++14 } } + +template +struct complex {}; + +struct plus {}; +struct multiplies {}; + +template +constexpr T identity_element; + +template<> +constexpr int identity_element = 0; + +template +constexpr complex identity_element, plus> = { + identity_element, + identity_element +};