https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98157
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.3 Known to fail| |10.2.0 Summary|internal compiler error: |ICE: tree check: expected |Segmentation, gcc 10.2, |tree that contains ‘decl |-std=gnu++2a |minimal’ structure, have | |‘tree_list’ in | |add_candidates, at | |cp/call.c:5803 since | |r10-6219-g8b91e848130e45b4 Status|UNCONFIRMED |NEW Known to work| |11.0 Ever confirmed|0 |1 CC| |jason at gcc dot gnu.org, | |marxin at gcc dot gnu.org, | |nathan at gcc dot gnu.org Last reconfirmed| |2020-12-06 --- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> --- Thanks for the report. It was introduced in r10-6219-g8b91e848130e45b4 and got fixed in r11-2876-g1f53d8f1d3e7519b. Is it something we want to backport to GCC 10 branch? Reduced test-case: $ cat game_test.ii struct pair { int second; }; template <typename _InputIterator, typename _Function> void for_each(_InputIterator, _Function __f) { _InputIterator __first; __f(*__first); } template <typename, unsigned long> struct array { int operator[](long); }; class span { public: template <typename _Tp, unsigned long _ArrayExtent> span(array<_Tp, _ArrayExtent>); }; enum Trans_NS_constants_gb_playerstate_t { ALLIN }; class gamecards { void operator==(gamecards); }; template <int> class gamestate { protected: array<Trans_NS_constants_gb_playerstate_t, 1> m_playerstate; void operator==(gamestate); }; template <int N> class game : gamestate<N>, gamecards { public: game(span, int); array<int, 1> payouts() { pair __trans_tmp_2; for_each(&__trans_tmp_2, [&](auto e) { this->m_playerstate[e.second] == ALLIN; }); } }; void TestBody() { array<int, 1> cards = game<3>(cards, 0).payouts(); }