From: Jakub Jelinek Date: Tue, 10 Oct 2017 20:10:25 +0000 (+0200) Subject: re PR c++/77786 (ICE in tsubst_copy, at cp/pt.c:13040) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10885d138e6c4c46d64031eb345d73202a535949;p=gcc.git re PR c++/77786 (ICE in tsubst_copy, at cp/pt.c:13040) PR c++/77786 * g++.dg/cpp1y/pr77786.C: New test. From-SVN: r253614 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 307acde68c8..c306573c5e9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2017-10-10 Jakub Jelinek + PR c++/77786 + * g++.dg/cpp1y/pr77786.C: New test. + PR c++/71875 * g++.dg/cpp1y/pr71875.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp1y/pr77786.C b/gcc/testsuite/g++.dg/cpp1y/pr77786.C new file mode 100644 index 00000000000..e242228335c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr77786.C @@ -0,0 +1,21 @@ +// PR c++/77786 +// { dg-do compile { target c++14 } } + +#include + +template +void +foo (std::vector a) +{ + auto const a_size = a.size(); + auto bar = [&](auto y) -> void { int a_size_2 = a_size; }; + double x = 0.0; + bar (x); +} + +int +main () +{ + std::vector a(1); + foo<1>(a); +}