re PR c++/66210 (Variable template specialization does not work with alias-declarations)
authorPaolo Carlini <paolo@gcc.gnu.org>
Thu, 21 May 2015 22:39:32 +0000 (22:39 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 21 May 2015 22:39:32 +0000 (22:39 +0000)
2015-05-21  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/66210
* g++.dg/cpp1y/var-templ28.C: New.

From-SVN: r223506

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/var-templ28.C [new file with mode: 0644]

index a2d8133a7f2873cd8e13094012aaebe5d093d3d0..c3cd0e58d50e25bc3fbc8219597cfdf3a3112f9c 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/66210
+       * g++.dg/cpp1y/var-templ28.C: New.
+
 2015-05-21  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/66232
@@ -10,7 +15,7 @@
 2015-05-21  Nathan Sidwell  <nathan@acm.org>
 
        * g++.dg/cpp1y/pr60943.C: New.
-                                        
+
 2015-05-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/66233
@@ -40,7 +45,7 @@
 
        * gcc.target/hppa/shadd-4.c: New test.
 
-2015-05-08  Michael Matz  <matz@suse.de>
+2015-05-21  Michael Matz  <matz@suse.de>
 
        * 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 (file)
index 0000000..ba09278
--- /dev/null
@@ -0,0 +1,15 @@
+// PR c++/66210
+// { dg-do compile { target c++14 } }
+
+using resultType = const char*;
+
+template<typename T>
+T pi = (T)(3.1415926535897932385);
+
+template<>
+resultType pi<resultType> = "pi";
+
+void foo()
+{
+  (void)pi<resultType>;
+}