From: Paolo Carlini Date: Wed, 22 Apr 2020 16:05:18 +0000 (+0200) Subject: Add testcase of PR c++/90448, already fixed in trunk. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=183e9006cc0300257d6f74d573514ef86f78cb4e;p=gcc.git Add testcase of PR c++/90448, already fixed in trunk. PR c++/90448 * g++.dg/cpp1y/lambda-generic-variadic20.C: New. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e60da71c99c..f6dd7ac6777 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-04-22 Paolo Carlini + + PR c++/90448 + * g++.dg/cpp1y/lambda-generic-variadic20.C: New. + 2020-04-22 Martin Sebor PR middle-end/94647 diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic20.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic20.C new file mode 100644 index 00000000000..3af971bbf12 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic20.C @@ -0,0 +1,16 @@ +// PR c++/90448 +// { dg-do compile { target c++14 } } + +template int fooV(Ts ... ts) { + auto L = [](auto ... a) { + auto M = [](decltype(a) ... b) -> void { + }; + return M; + }; + + decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; + + return 0; +} + +int run2 = fooV("BC", 3, 2.77, 'A', float{}, short{}, unsigned{});