re PR c++/82882 (ICE Segmentation fault)

PR c++/82882
	PR c++/83978
	* g++.dg/cpp0x/pr82882.C: New test.
	* g++.dg/cpp0x/pr83978.C: New test.

From-SVN: r256985
This commit is contained in:
Jakub Jelinek 2018-01-23 15:04:18 +01:00 committed by Jakub Jelinek
parent 941ae8b48e
commit 55a46cb54a
3 changed files with 26 additions and 0 deletions

View File

@ -1,5 +1,10 @@
2018-01-23 Jakub Jelinek <jakub@redhat.com>
PR c++/82882
PR c++/83978
* g++.dg/cpp0x/pr82882.C: New test.
* g++.dg/cpp0x/pr83978.C: New test.
PR c++/83958
* g++.dg/cpp1z/decomp35.C: New test.

View File

@ -0,0 +1,15 @@
// PR c++/82882
// { dg-do compile { target c++11 } }
template <typename>
void
foo ()
{
auto v = [] { enum { E, F }; };
}
void
bar ()
{
foo<int> ();
}

View File

@ -0,0 +1,6 @@
// PR c++/83978
// { dg-do compile { target c++11 } }
template <int N>
struct A { A () { auto a = [] { enum E { F }; }; } };
A<0> *p = new A<0> ();