From: Marek Polacek Date: Thu, 13 Jun 2019 01:31:03 +0000 (+0000) Subject: re PR c++/87410 (internal compiler error: in fold_convert_loc, at fold-const.c:2530) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=edde16fc017f0b070f82c309d78a3ef5377d83bd;p=gcc.git re PR c++/87410 (internal compiler error: in fold_convert_loc, at fold-const.c:2530) PR c++/87410 * g++.dg/cpp1y/pr87410.C: New test. From-SVN: r272230 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1c49ab9f7d5..591d1f4a343 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-06-12 Marek Polacek + + PR c++/87410 + * g++.dg/cpp1y/pr87410.C: New test. + 2019-06-12 Marek Polacek PR c++/66999 - 'this' captured by reference. diff --git a/gcc/testsuite/g++.dg/cpp1y/pr87410.C b/gcc/testsuite/g++.dg/cpp1y/pr87410.C new file mode 100644 index 00000000000..5a691e40b0a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr87410.C @@ -0,0 +1,19 @@ +// PR c++/87410 +// { dg-do compile { target c++14 } } + +template using b = const char[a]; +template +constexpr auto g(b &, b &, f) {} +template auto h(b &) { + auto i = j(static_cast(nullptr)); + return **i; +} +class k { + using l = k; + const int &m() const; + friend constexpr auto j(l **n) -> decltype(n) { + g("", "", static_cast(&k::m)); + return n; + } +}; +k o = h("");