From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA3383858280; Tue, 5 Jul 2022 18:44:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA3383858280 From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106205] New: ICE: canonical types differ for identical types 'int()' and 'int()' Date: Tue, 05 Jul 2022 18:44:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2022 18:44:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106205 Bug ID: 106205 Summary: ICE: canonical types differ for identical types 'int()' and 'int()' Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Affects versions down to at least r5 (with -std=3Dc++11) : (gcc configured with --enable-checking=3Dyes) $ cat z1.cc template a b() { return a(); }; struct t { void f() { for (t c : b); }; }; $ gcc-13-20220703 -c z1.cc z1.cc:1:29: error: parameter packs not expanded with '...': 1 | template a b() { return a(); }; | ^ z1.cc:1:29: note: 'a' z1.cc: In function 'int b()': z1.cc:1:40: error: parameter packs not expanded with '...': 1 | template a b() { return a(); }; | ^~~ z1.cc:1:40: note: 'a' z1.cc: In member function 'void t::f()': z1.cc:4:25: internal compiler error: canonical types differ for identical t= ypes 'int()' and 'int()' 4 | void f() { for (t c : b); }; | ^ 0xa4d28c comptypes(tree_node*, tree_node*, int) ../../gcc/cp/typeck.cc:1560 0x751425 resolve_address_of_overloaded_function ../../gcc/cp/class.cc:8547 0x7473d6 reference_binding ../../gcc/cp/call.cc:1722 0x747bc2 initialize_reference(tree_node*, tree_node*, int, int) ../../gcc/cp/call.cc:13073 0x7eafb6 grok_reference_init ../../gcc/cp/decl.cc:6017 0x7eafb6 check_initializer ../../gcc/cp/decl.cc:7312 0x8199c6 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/cp/decl.cc:8443 0x9066e9 cp_convert_range_for(tree_node*, tree_node*, tree_node*, tree_node= *, unsigned int, bool, unsigned short) ../../gcc/cp/parser.cc:13876 0x90f462 cp_parser_range_for ../../gcc/cp/parser.cc:13676 0x94d42e cp_parser_for ../../gcc/cp/parser.cc:13533 0x94d42e cp_parser_iteration_statement ../../gcc/cp/parser.cc:14162 0x920f14 cp_parser_statement ../../gcc/cp/parser.cc:12337 0x922364 cp_parser_statement_seq_opt ../../gcc/cp/parser.cc:12906 0x922447 cp_parser_compound_statement ../../gcc/cp/parser.cc:12858 0x949fc0 cp_parser_function_body ../../gcc/cp/parser.cc:25205 0x949fc0 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.cc:25256 0x94a63a cp_parser_function_definition_after_declarator ../../gcc/cp/parser.cc:31404 0x94a9e8 cp_parser_late_parsing_for_member ../../gcc/cp/parser.cc:32371 0x91bf12 cp_parser_class_specifier ../../gcc/cp/parser.cc:26326 0x91d4fc cp_parser_type_specifier ../../gcc/cp/parser.cc:19411=