https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105006
Bug ID: 105006 Summary: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C++ code: emplate <typename eT> class Row { eT ::operator(); void operator()(); template <long> class fixed; }; template <typename eT> template <int> class Row<eT>::fixed : Row { Row::operator(); }; compiled by recent gcc trunk does this: bug799.cc:2:3: warning: access declarations are deprecated in favour of using-declarations; suggestion: add the ‘using’ keyword [-Wdeprecated] 2 | eT ::operator(); | ^~ bug799.cc:7:17: internal compiler error: tree check: expected function_decl, have using_decl in maybe_push_used_met hods, at cp/class.cc:1325 7 | Row::operator(); | ^ 0x13a8ce6 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../trunk.git/gcc/tree.cc:8724 0x6cdcc5 maybe_push_used_methods(tree_node*) ../../trunk.git/gcc/cp/class.cc:0 The bug first seems to occur sometime between git hash 3a7ba8fd0cda3878 and 2663d18356b0a62f, a distance of 33 commits.