https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97582
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Keywords| |ice-on-valid-code CC| |jason at gcc dot gnu.org, | |marxin at gcc dot gnu.org Summary|Regression Internal |[9/10/11 Regression] ICE |compiler error in lambda |tree check: expected | |function_type or | |method_type, have | |error_mark in | |add_function_candidate, at | |cp/call.c:2146 since | |r9-6405-gbddee796d0b4800b Target Milestone|--- |9.4 Last reconfirmed| |2020-10-26 --- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> --- Started with r9-6405-gbddee796d0b4800b. Reduced test-case: $ cat pr97582.ii template <typename, typename> class __normal_iterator {}; template <typename _Iterator, typename _Container> void operator==(__normal_iterator<_Iterator, _Container>, __normal_iterator<_Iterator, _Container>); template <typename _Predicate> struct _Iter_pred { _Predicate _M_pred; template <typename _Iterator> void operator()(_Iterator __it) { _M_pred(__it); } }; template <typename _Predicate> _Iter_pred<_Predicate> __pred_iter(_Predicate) {} template <typename _RandomAccessIterator, typename _Predicate> void __find_if(_RandomAccessIterator __first, _Predicate __pred) { __pred(__first); } template <typename _InputIterator, typename _Predicate> void none_of(_InputIterator __last, _Predicate __pred) { find_if(__last, __pred); } template <typename _InputIterator, typename _Predicate> void any_of(_InputIterator, _InputIterator __last, _Predicate __pred) { none_of(__last, __pred); } template <typename _InputIterator, typename _Tp> _InputIterator find(_InputIterator, _Tp); template <typename _InputIterator, typename _Predicate> void find_if(_InputIterator __last, _Predicate __pred) { _Iter_pred __trans_tmp_1 = __pred_iter(__pred); __find_if(__last, __trans_tmp_1); } class C2 { void operator==(C2); }; class C6 { void operator==(C6); }; class C5 : C6, C2 { void get() { __normal_iterator<C6 *, int> __trans_tmp_2, __trans_tmp_3; any_of(__trans_tmp_2, __trans_tmp_3, [](auto elem) { __normal_iterator<const int **, int> __trans_tmp_4, __trans_tmp_5; find(__trans_tmp_4, elem) == __trans_tmp_5; }); } };