public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106205] New: ICE: canonical types differ for identical types 'int()' and 'int()'
@ 2022-07-05 18:44 gscfq@t-online.de
  2022-07-05 19:06 ` [Bug c++/106205] " mpolacek at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: gscfq@t-online.de @ 2022-07-05 18:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106205

            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=c++11) :
(gcc configured with --enable-checking=yes)


$ cat z1.cc
template<typename... a> 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<typename... a> 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<typename... a> 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 types
'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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/106205] ICE: canonical types differ for identical types 'int()' and 'int()'
  2022-07-05 18:44 [Bug c++/106205] New: ICE: canonical types differ for identical types 'int()' and 'int()' gscfq@t-online.de
@ 2022-07-05 19:06 ` mpolacek at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-07-05 19:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106205

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-07-05
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-05 19:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 18:44 [Bug c++/106205] New: ICE: canonical types differ for identical types 'int()' and 'int()' gscfq@t-online.de
2022-07-05 19:06 ` [Bug c++/106205] " mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).