From 57fbfd5a55e2ffb1179a2fd2836a7c95c687d83a Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 26 Nov 2015 18:43:47 +0000 Subject: [PATCH] re PR c++/67238 ([C++11][C++14]cc1plus crash for nested decltype expression in parameter pack in trailing return type when '-g' enabled) 2015-11-26 Paolo Carlini PR c++/67238 * g++.dg/cpp0x/pr67238.C: New. From-SVN: r230981 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/pr67238.C | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr67238.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index df920a0fa48..d84b6a87ebb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-11-26 Paolo Carlini + + PR c++/67238 + * g++.dg/cpp0x/pr67238.C: New. + 2015-11-26 Martin Sebor * g++.dg/pr67876.C: Remove duplicate content. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr67238.C b/gcc/testsuite/g++.dg/cpp0x/pr67238.C new file mode 100644 index 00000000000..606a21e591b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr67238.C @@ -0,0 +1,20 @@ +// { dg-do compile { target c++11 } } +// { dg-options "-g" } + +template +void +g(F&&, A&&...) +{} + +template +auto +h(A&&... a) -> decltype(g(0, g(a)...)) +{ + return g([]{}, a...); +} + +int +main() +{ + h(); +} -- 2.30.2