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  <paolo.carlini@oracle.com>

	PR c++/67238
	* g++.dg/cpp0x/pr67238.C: New.

From-SVN: r230981
This commit is contained in:
Paolo Carlini 2015-11-26 18:43:47 +00:00 committed by Paolo Carlini
parent 83cc5c7a2f
commit 57fbfd5a55
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2015-11-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/67238
* g++.dg/cpp0x/pr67238.C: New.
2015-11-26 Martin Sebor <msebor@redhat.com>
* g++.dg/pr67876.C: Remove duplicate content.

View File

@ -0,0 +1,20 @@
// { dg-do compile { target c++11 } }
// { dg-options "-g" }
template<class F, class... A>
void
g(F&&, A&&...)
{}
template<class... A>
auto
h(A&&... a) -> decltype(g(0, g<decltype(a)>(a)...))
{
return g([]{}, a...);
}
int
main()
{
h();
}