From 55a46cb54a7ebabd298e7f574993bb73f879758c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 23 Jan 2018 15:04:18 +0100 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/pr82882.C | 15 +++++++++++++++ gcc/testsuite/g++.dg/cpp0x/pr83978.C | 6 ++++++ 3 files changed, 26 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr82882.C create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr83978.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8a997aa8614..5c1d57f7ed2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2018-01-23 Jakub Jelinek + 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. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr82882.C b/gcc/testsuite/g++.dg/cpp0x/pr82882.C new file mode 100644 index 00000000000..d4f35d64a24 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr82882.C @@ -0,0 +1,15 @@ +// PR c++/82882 +// { dg-do compile { target c++11 } } + +template +void +foo () +{ + auto v = [] { enum { E, F }; }; +} + +void +bar () +{ + foo (); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/pr83978.C b/gcc/testsuite/g++.dg/cpp0x/pr83978.C new file mode 100644 index 00000000000..ce1e51e8aa6 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr83978.C @@ -0,0 +1,6 @@ +// PR c++/83978 +// { dg-do compile { target c++11 } } + +template +struct A { A () { auto a = [] { enum E { F }; }; } }; +A<0> *p = new A<0> (); -- 2.30.2