From e5ab6728fb1499a8ed5cb2423942a85ffa288d7b Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 21 May 2015 22:39:32 +0000 Subject: [PATCH] re PR c++/66210 (Variable template specialization does not work with alias-declarations) 2015-05-21 Paolo Carlini PR c++/66210 * g++.dg/cpp1y/var-templ28.C: New. From-SVN: r223506 --- gcc/testsuite/ChangeLog | 9 +++++++-- gcc/testsuite/g++.dg/cpp1y/var-templ28.C | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp1y/var-templ28.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a2d8133a7f2..c3cd0e58d50 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-05-21 Paolo Carlini + + PR c++/66210 + * g++.dg/cpp1y/var-templ28.C: New. + 2015-05-21 H.J. Lu PR target/66232 @@ -10,7 +15,7 @@ 2015-05-21 Nathan Sidwell * g++.dg/cpp1y/pr60943.C: New. - + 2015-05-21 Jakub Jelinek PR tree-optimization/66233 @@ -40,7 +45,7 @@ * gcc.target/hppa/shadd-4.c: New test. -2015-05-08 Michael Matz +2015-05-21 Michael Matz * gcc.dg/vect/vect-strided-store.c: New test. * gfortran.dg/vect/fast-math-pr37021.f90: Adjust. diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ28.C b/gcc/testsuite/g++.dg/cpp1y/var-templ28.C new file mode 100644 index 00000000000..ba092782653 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ28.C @@ -0,0 +1,15 @@ +// PR c++/66210 +// { dg-do compile { target c++14 } } + +using resultType = const char*; + +template +T pi = (T)(3.1415926535897932385); + +template<> +resultType pi = "pi"; + +void foo() +{ + (void)pi; +} -- 2.30.2