https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90764
Bug ID: 90764 Summary: [10 Regression] internal compiler error in build_deduction_guide, at cp/pt.c:27162 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- namespace a { struct b; template <typename...> using c = b; } template <typename... d> struct e : a::c<d...> { using a::c<>::c; }; template <template <typename> typename f> void g() { f(); } void h() { g<e>(); } $ ./cc1plus -quiet ice.cc -std=c++17 ice.cc: In instantiation of ‘void g() [with f = e]’: ice.cc:7:17: required from here ice.cc:6:54: internal compiler error: tree check: expected var_decl or field_decl or function_decl or type_decl or template_decl, have using_decl in build_deduction_guide, at cp/pt.c:27162 6 | template <template <typename> typename f> void g() { f(); } | ^~~ 0x17ef2dc tree_check_failed(tree_node const*, char const*, int, char const*, ...) /home/mpolacek/src/gcc/gcc/tree.c:9894 0x871bdc tree_check5(tree_node*, char const*, int, char const*, tree_code, tree_code, tree_code, tree_code, tree_code) /home/mpolacek/src/gcc/gcc/tree.h:3285 0xaf6037 build_deduction_guide /home/mpolacek/src/gcc/gcc/cp/pt.c:27162 0xaf822e do_class_deduction /home/mpolacek/src/gcc/gcc/cp/pt.c:27394 0xaf8a6e do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) /home/mpolacek/src/gcc/gcc/cp/pt.c:27528 0xba614f build_functional_cast(tree_node*, tree_node*, int) /home/mpolacek/src/gcc/gcc/cp/typeck2.c:2213 0xacfc76 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:18432 0xacd9f3 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:17923 0xac6683 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:17050 0xac8e7f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:17330 0xaec1fd instantiate_decl(tree_node*, bool, bool) /home/mpolacek/src/gcc/gcc/cp/pt.c:24769 0xaecbd6 instantiate_pending_templates(int) /home/mpolacek/src/gcc/gcc/cp/pt.c:24885 0x966d02 c_parse_final_cleanups() /home/mpolacek/src/gcc/gcc/cp/decl2.c:4821 0xc28828 c_common_parse_file() /home/mpolacek/src/gcc/gcc/c-family/c-opts.c:1178 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.