re PR c++/64398 (decltype in different contexts with similar expressions triggers...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 4 Mar 2015 08:32:23 +0000 (08:32 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 4 Mar 2015 08:32:23 +0000 (08:32 +0000)
2015-03-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/64398
* g++.dg/cpp0x/decltype62.C: New.

From-SVN: r221174

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/decltype62.C [new file with mode: 0644]

index d38eb5227681304866df8a3f273472f9a1947488..8700a47a8c18a94e4fa1028930dcdef1b3981168 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-04  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/64398
+       * g++.dg/cpp0x/decltype62.C: New.
+
 2015-03-03  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gnat.dg/object_overflow5.adb: New test.
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype62.C b/gcc/testsuite/g++.dg/cpp0x/decltype62.C
new file mode 100644 (file)
index 0000000..f2f1606
--- /dev/null
@@ -0,0 +1,15 @@
+// PR c++/64398
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct template1;
+
+template<typename T, typename> // second param required
+struct struct1{
+       using type1 = decltype(T::x);
+       using type2 = template1<type1>;
+};
+
+template<typename T> using alias1 = template1<decltype(T::x)>;
+
+// just for instantiation:
+template<typename T> using alias2 = alias1<T>;