From: Jakub Jelinek Date: Fri, 14 May 2021 11:24:12 +0000 (+0200) Subject: testsuite: Add testcase for already fixed PR X-Git-Tag: releases/gcc-10.4.0~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a32d7258f498076d0d8aa998a069f5c1c58c6b5;p=thirdparty%2Fgcc.git testsuite: Add testcase for already fixed PR 2021-05-14 Jakub Jelinek * g++.dg/cpp1y/pr88872.C: New test. (cherry picked from commit f05627d404038368b99e92ac4df4c29f4ae4a5fa) --- diff --git a/gcc/testsuite/g++.dg/cpp1y/pr88872.C b/gcc/testsuite/g++.dg/cpp1y/pr88872.C new file mode 100644 index 000000000000..3719e395c0ee --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr88872.C @@ -0,0 +1,24 @@ +// PR c++/88872 +// { dg-do compile { target c++14 } } + +struct a { + template constexpr a(b) : c() {} + int c; +}; +void d(); +template constexpr a operator"" _n() { return d; } +struct e; +struct f { + e operator[](int); +}; +struct g { + void h(); + f i; +}; +template struct j { + void k() { [](auto) { constexpr auto l = 2_n; }(keywords); } + int keywords; +}; +using m = j; +class e : public m {}; +void g::h() { i[0].k(); }