https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88419
Bug ID: 88419 Summary: [9 Regression] [ICE] "Same canonical type node for different types" for CTAD in noexcept Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Casey at Carter dot net Target Milestone: --- Created attachment 45191 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45191&action=edit Repro This TU: template<class> struct ref_view { template<class T> ref_view(T&&); }; template<class R> ref_view(R&) -> ref_view<R>; struct ref_fn { template<class R> auto operator()(R r) const noexcept(noexcept(ref_view{r})); }; template<class R> struct indirect_view { indirect_view(R); }; struct indirect_fn { template<class R> auto operator()(R r) const noexcept(noexcept(indirect_view{r})); }; ICEs when compiled with "g++ -std=c++17 -c": /home/casey/casey/Desktop/repro.cpp:18:40: internal compiler error: same canonical type node for different types ‘indirect_view’ and ‘ref_view’ 18 | noexcept(noexcept(indirect_view{r})); | ^ 0x9fd2af comptypes(tree_node*, tree_node*, int) /home/casey/repos/gcc/gcc/cp/typeck.c:1486 0x9f3076 cp_tree_equal(tree_node*, tree_node*) /home/casey/repos/gcc/gcc/cp/tree.c:3558 0x9f3d6f cp_tree_equal(tree_node*, tree_node*) /home/casey/repos/gcc/gcc/cp/tree.c:3816 0x9e3772 cp_check_qualified_type /home/casey/repos/gcc/gcc/cp/tree.c:2135 0x9e7557 build_cp_fntype_variant(tree_node*, cp_ref_qualifier, tree_node*, bool) /home/casey/repos/gcc/gcc/cp/tree.c:2568 0x9e7647 build_cp_fntype_variant(tree_node*, cp_ref_qualifier, tree_node*, bool) /home/casey/repos/gcc/gcc/cp/tree.c:2599 0x8b9aeb grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) /home/casey/repos/gcc/gcc/cp/decl.c:11527 0x8caa3e grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*, bool, tree_node*, tree_node*) /home/casey/repos/gcc/gcc/cp/decl2.c:814 0x95b2f1 cp_parser_init_declarator /home/casey/repos/gcc/gcc/cp/parser.c:20306 0x95ef04 cp_parser_single_declaration /home/casey/repos/gcc/gcc/cp/parser.c:27954 0x95f04c cp_parser_template_declaration_after_parameters /home/casey/repos/gcc/gcc/cp/parser.c:27546 0x95f98d cp_parser_explicit_template_declaration /home/casey/repos/gcc/gcc/cp/parser.c:27792 0x95f98d cp_parser_template_declaration_after_export /home/casey/repos/gcc/gcc/cp/parser.c:27811 0x960cbd cp_parser_member_declaration /home/casey/repos/gcc/gcc/cp/parser.c:24070 0x93b07a cp_parser_member_specification_opt /home/casey/repos/gcc/gcc/cp/parser.c:23997 0x93b07a cp_parser_class_specifier_1 /home/casey/repos/gcc/gcc/cp/parser.c:23141 0x93d049 cp_parser_class_specifier /home/casey/repos/gcc/gcc/cp/parser.c:23403 0x93d049 cp_parser_type_specifier /home/casey/repos/gcc/gcc/cp/parser.c:17259 0x93e03b cp_parser_decl_specifier_seq /home/casey/repos/gcc/gcc/cp/parser.c:13982 0x93e773 cp_parser_simple_declaration /home/casey/repos/gcc/gcc/cp/parser.c:13287 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.