diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/pr54318.C | 24 |
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 88ac420..b716353 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 index 0000000..4dac31b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr54318.C @@ -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>>()); +} |