From: Marek Polacek Date: Sat, 23 Feb 2019 14:54:23 +0000 (+0000) Subject: re PR c++/89419 (ICE in is_normal_capture_proxy starting with r253601) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3aab3d374adf1b333661a6948c586c8d665a0807;p=gcc.git re PR c++/89419 (ICE in is_normal_capture_proxy starting with r253601) PR c++/89419 * g++.dg/cpp1y/lambda-generic-89419.C: New test. From-SVN: r269159 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index da4aa85aa41..3cd5d935edf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -4,6 +4,9 @@ * g++.dg/cpp0x/noexcept34.C: New test. * g++.dg/cpp0x/noexcept35.C: New test. + PR c++/89419 + * g++.dg/cpp1y/lambda-generic-89419.C: New test. + 2019-02-23 Paul Thomas PR fortran/88117 diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-89419.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-89419.C new file mode 100644 index 00000000000..46ce909f3b8 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-89419.C @@ -0,0 +1,24 @@ +// PR c++/89419 +// { dg-do compile { target c++14 } } + +struct A; +struct B { + struct C { C (); C (C &); } b; +}; +struct D { A operator* (); }; +struct A { + template void foo (T x) { x (this); } +}; +struct E { + auto bar () { return e; } + D e; +}; +struct F { B f; int g; }; + +int +main () +{ + E e; + auto f = *e.bar (); + auto i = [&] { F g; g.g = 1; auto h = [&](auto) { g.g = 0; }; f.foo (h); return g; }; +}