2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 May 2013 09:35:42 +0000 (09:35 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 May 2013 09:35:42 +0000 (09:35 +0000)
PR c++/54318
* g++.dg/cpp0x/pr54318.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198573 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 88ac420..b716353 100644 (file)
@@ -1,5 +1,10 @@
 2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
 
+       PR c++/54318
+       * g++.dg/cpp0x/pr54318.C: New.
+
+2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
+
        PR c++/14283
        * g++.dg/parse/error51.C: New.
        * g++.dg/parse/error15.C: Adjust column numbers.
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr54318.C b/gcc/testsuite/g++.dg/cpp0x/pr54318.C
new file mode 100644 (file)
index 0000000..4dac31b
--- /dev/null
@@ -0,0 +1,24 @@
+// PR c++/54318
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+struct wrapped
+{
+  typedef T type;
+};
+
+template <typename T>
+typename T::type unwrap1(T);
+
+int unwrap(int);
+
+template <typename T>
+auto unwrap(T t) -> decltype(unwrap(unwrap1(t)))
+{
+  return unwrap(unwrap1(t));
+}
+
+int main()
+{
+  unwrap(wrapped<wrapped<int>>());
+}