https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295
Bug ID: 93295 Summary: ICE in alias_ctad_tweaks Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ensadc at mailnesia dot com Target Milestone: --- https://wandbox.org/permlink/B02uUhc2QP8OChB9 ==== template<class T> struct A { A(int); }; template<class T> A(T) -> A<T*>; template<class T, class = int> using B = A<T>; B a(0); ==== prog.cc:10:12: internal compiler error: in alias_ctad_tweaks, at cp/pt.c:28223 10 | B a((int*)0); | ^ 0x5b9faa alias_ctad_tweaks ../../source/gcc/cp/pt.c:28223 0x5b9faa deduction_guides_for ../../source/gcc/cp/pt.c:28395 0x7048b3 do_class_deduction ../../source/gcc/cp/pt.c:28500 0x7048b3 do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) ../../source/gcc/cp/pt.c:28629 0x6693e6 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../source/gcc/cp/decl.c:7463 0x6eb461 cp_parser_init_declarator ../../source/gcc/cp/parser.c:20762 0x6ce805 cp_parser_simple_declaration ../../source/gcc/cp/parser.c:13627 0x6f3962 cp_parser_declaration ../../source/gcc/cp/parser.c:13325 0x6f4084 cp_parser_translation_unit ../../source/gcc/cp/parser.c:4723 0x6f4084 c_parse_file() ../../source/gcc/cp/parser.c:43563 0x7bb56b c_common_parse_file() ../../source/gcc/c-family/c-opts.c:1186 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. ==== The error disappears if `A<T*>` is changed to `A<T>`, or if `, class = int` is removed.