From: Jakub Jelinek Date: Mon, 12 Mar 2018 09:02:36 +0000 (+0100) Subject: re PR c++/84813 (internal compiler error: Segmentation fault with lambdas and constex... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b270a5215a4ed5a99efa93ed34a98eab75fe13c7;p=gcc.git re PR c++/84813 (internal compiler error: Segmentation fault with lambdas and constexpr variables) PR c++/84813 * g++.dg/debug/pr84813.C: New test. From-SVN: r258445 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 883fbb0c6a0..69c00d1b23e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,7 +1,12 @@ +2018-03-12 Jakub Jelinek + + PR c++/84813 + * g++.dg/debug/pr84813.C: New test. + 2018-03-11 Paul Thomas PR fortran/84546 - * gfortran.dg/unlimited_polymorphic_29.f90 : New test. + * gfortran.dg/unlimited_polymorphic_29.f90: New test. 2018-03-11 Steven G. Kargl diff --git a/gcc/testsuite/g++.dg/debug/pr84813.C b/gcc/testsuite/g++.dg/debug/pr84813.C new file mode 100644 index 00000000000..af23b309cba --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/pr84813.C @@ -0,0 +1,33 @@ +// PR c++/84813 +// { dg-do compile } +// { dg-options "-g -std=c++14" } + +template +struct P {}; + +template +struct F { + using type = int; +}; + +template +void +apply () +{ + constexpr int N = T::N; + [] (typename F::type) + { + auto f = [] () {}; + P{}; + }; +} + +struct A { + static constexpr int N = 1; +}; + +void +instantiate () +{ + apply (); +}