diff mbox series

[committed] Add testcases for PR c++/82882 and PR c++/83978

Message ID 20180123140600.GR2063@tucnak
State New
Headers show
Series [committed] Add testcases for PR c++/82882 and PR c++/83978 | expand

Commit Message

Jakub Jelinek Jan. 23, 2018, 2:06 p.m. UTC
Hi!

These 2 PRs were fixed with r256964 and stay fixed even with r256965.
So I've just committed the testcase to the trunk and am going to close them
as fixed.

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.


	Jakub
diff mbox series

Patch

--- gcc/testsuite/g++.dg/cpp0x/pr82882.C.jj	2018-01-23 15:01:19.781297360 +0100
+++ gcc/testsuite/g++.dg/cpp0x/pr82882.C	2018-01-23 15:00:41.739297731 +0100
@@ -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> ();
+}
--- gcc/testsuite/g++.dg/cpp0x/pr83978.C.jj	2018-01-23 15:01:30.086297256 +0100
+++ gcc/testsuite/g++.dg/cpp0x/pr83978.C	2018-01-23 15:00:54.721297609 +0100
@@ -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> ();