From: Jakub Jelinek Date: Tue, 23 Jan 2018 14:04:18 +0000 (+0100) Subject: re PR c++/82882 (ICE Segmentation fault) X-Git-Tag: upstream/12.2.0~33861 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55a46cb54a7ebabd298e7f574993bb73f879758c;p=platform%2Fupstream%2Fgcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8a997aa..5c1d57f 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 0000000..d4f35d6 --- /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 0000000..ce1e51e --- /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> ();