diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-05-03 09:35:42 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-05-03 09:35:42 +0000 |
commit | eacb22bf7330f5d8164e0742d4b0dda956865d44 (patch) | |
tree | d38cb575231567bc173fe63872ce8904900a347a /gcc | |
parent | c067d9fe141912636b9d757fbd83ce7d73300bfe (diff) | |
download | gcc-eacb22bf7330f5d8164e0742d4b0dda956865d44.zip gcc-eacb22bf7330f5d8164e0742d4b0dda956865d44.tar.gz gcc-eacb22bf7330f5d8164e0742d4b0dda956865d44.tar.bz2 |
re PR c++/54318 ([C++11] Bogus "template instantiation depth exceeds maximum" error + segfault)
2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54318
* g++.dg/cpp0x/pr54318.C: New.
From-SVN: r198573
Diffstat (limited to 'gcc')
-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>>()); +} |