https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68434
Bug ID: 68434 Summary: [concepts] ICE same canonical type node for different types Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ryan.burn at gmail dot com Target Milestone: --- The code below generates this ICE when compiled with g++ (GCC) 6.0.0 20151118 (experimental) constexpr bool C1() constexpr bool C2() constexpr bool C3() reduce2.cpp: At global scope: reduce2.cpp:19:10: internal compiler error: same canonical type node for different types C2 and C1 auto f(C3) { ^ 0x8fb760 comptypes(tree_node*, tree_node*, int) ../../src-orig/gcc/cp/typeck.c:1435 0x9857e8 cp_tree_equal(tree_node*, tree_node*) ../../src-orig/gcc/cp/tree.c:3128 0x9857a1 cp_tree_equal(tree_node*, tree_node*) ../../src-orig/gcc/cp/tree.c:3121 0x9857a1 cp_tree_equal(tree_node*, tree_node*) ../../src-orig/gcc/cp/tree.c:3121 0xa17928 insert ../../src-orig/gcc/cp/logic.cc:131 0xa17c8d left_conjunction ../../src-orig/gcc/cp/logic.cc:237 0xa17e6d decompose_left_term ../../src-orig/gcc/cp/logic.cc:292 0xa17f07 decompose_left_goal ../../src-orig/gcc/cp/logic.cc:315 0xa17f5d decompose_left ../../src-orig/gcc/cp/logic.cc:327 0xa18179 decompose_assumptions(tree_node*) ../../src-orig/gcc/cp/logic.cc:373 0xa12af0 build_constraints(tree_node*, tree_node*) ../../src-orig/gcc/cp/constraint.cc:1035 0x780e0f grokfndecl ../../src-orig/gcc/cp/decl.c:7819 0x78c25d grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) ../../src-orig/gcc/cp/decl.c:11292 0x79f2c9 start_function(cp_decl_specifier_seq*, cp_declarator const*, tree_node*) ../../src-orig/gcc/cp/decl.c:14069 0x8bd2c1 cp_parser_function_definition_from_specifiers_and_declarator ../../src-orig/gcc/cp/parser.c:24703 0x8b09bd cp_parser_init_declarator ../../src-orig/gcc/cp/parser.c:17972 0x8a6d64 cp_parser_simple_declaration ../../src-orig/gcc/cp/parser.c:11971 0x8a6b22 cp_parser_block_declaration ../../src-orig/gcc/cp/parser.c:11843 0x8a689c cp_parser_declaration ../../src-orig/gcc/cp/parser.c:11740 0x8a63a7 cp_parser_declaration_seq_opt ../../src-orig/gcc/cp/parser.c:11619 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions ////////////////////////////////////////////////////////////// template <class> concept bool C1() { return true; } template <class> concept bool C2() { return true; } template <class Expr> concept bool C3() { return requires(Expr expr) { {expr}->C1; {expr}->C2; }; } auto f(C3) { } //////////////////////////////////////////////////////////////