https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94632
Bug ID: 94632 Summary: [10 Regression] canonical types differ for identical types since r10-7622-g12f55e030ed068d5 Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: ppalka at gcc dot gnu.org Target Milestone: --- It affects the build of libqt5-qtwebengine package: $ cat wtf.ii template <typename> struct a; template <bool> struct b; template <typename> class c { template <typename f> void d(f e, typename b<a<decltype(e)>::h>::g); public: static bool h; }; bool h = c<int>::h; $ g++ wtf.ii -c wtf.ii: In instantiation of ‘class c<int>’: wtf.ii:8:16: required from here wtf.ii:4:30: internal compiler error: canonical types differ for identical types ‘b<a<decltype (e)>::h>’ and ‘b<a<decltype (e)>::h>’ 4 | template <typename f> void d(f e, typename b<a<decltype(e)>::h>::g); | ^ 0xb29f7d comptypes(tree_node*, tree_node*, int) /home/marxin/Programming/gcc/gcc/cp/typeck.c:1519 0xb299d4 structural_comptypes /home/marxin/Programming/gcc/gcc/cp/typeck.c:1410 0xace7ba maybe_rebuild_function_decl_type /home/marxin/Programming/gcc/gcc/cp/pt.c:13541 0xace7ba tsubst_function_decl /home/marxin/Programming/gcc/gcc/cp/pt.c:13778 0xad0c90 tsubst_template_decl /home/marxin/Programming/gcc/gcc/cp/pt.c:14018 0xab94ee tsubst_decl /home/marxin/Programming/gcc/gcc/cp/pt.c:14140 0xac2ef7 tsubst(tree_node*, tree_node*, int, tree_node*) /home/marxin/Programming/gcc/gcc/cp/pt.c:15026 0xade994 instantiate_class_template_1 /home/marxin/Programming/gcc/gcc/cp/pt.c:11728 0xade994 instantiate_class_template(tree_node*) /home/marxin/Programming/gcc/gcc/cp/pt.c:12036 0xb2579d complete_type(tree_node*) /home/marxin/Programming/gcc/gcc/cp/typeck.c:137 0xa76193 cp_parser_nested_name_specifier_opt /home/marxin/Programming/gcc/gcc/cp/parser.c:6639 0xa7302e cp_parser_simple_type_specifier /home/marxin/Programming/gcc/gcc/cp/parser.c:18126 0xa744e7 cp_parser_postfix_expression /home/marxin/Programming/gcc/gcc/cp/parser.c:7173 0xa7d28f cp_parser_unary_expression /home/marxin/Programming/gcc/gcc/cp/parser.c:8560 0xa5421f cp_parser_cast_expression /home/marxin/Programming/gcc/gcc/cp/parser.c:9451 0xa54a59 cp_parser_binary_expression /home/marxin/Programming/gcc/gcc/cp/parser.c:9554 0xa564de cp_parser_assignment_expression /home/marxin/Programming/gcc/gcc/cp/parser.c:9859 0xa5548d cp_parser_constant_expression /home/marxin/Programming/gcc/gcc/cp/parser.c:10153 0xa55a51 cp_parser_initializer_clause /home/marxin/Programming/gcc/gcc/cp/parser.c:23216 0xa59cc7 cp_parser_initializer /home/marxin/Programming/gcc/gcc/cp/parser.c:23154 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.