public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99310] New: [11 Regression] ICE: canonical types differ for identical types 'void (A::)(void*)' and 'void (A::)(void*)'
@ 2021-02-28 14:27 asolokha at gmx dot com
  2021-03-01  9:31 ` [Bug c++/99310] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2021-02-28 14:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99310
           Summary: [11 Regression] ICE: canonical types differ for
                    identical types 'void (A::)(void*)' and 'void
                    (A::)(void*)'
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-unknown-linux-gnu

g++-11.0.0-alpha20210221 snapshot (g:2df374b337a5f6cf5528e91718e4e12e4006b7ae)
ICEs when compiling gcc/testsuite/g++.dg/other/pr39060.C w/ -march=corei7
-std=gnu++2a -fopenmp:

% x86_64-unknown-linux-gnu-g++-11.0.0 -march=corei7 -std=gnu++2a -fopenmp -c
gcc/testsuite/g++.dg/other/pr39060.C
gcc/testsuite/g++.dg/other/pr39060.C:7:3: error: 'A::A(void*)' cannot be
overloaded with 'A::A(void*)'
    7 |   A(void* i=);  // { dg-error "overloaded|primary-expression" }
      |   ^
gcc/testsuite/g++.dg/other/pr39060.C:6:3: note: previous declaration
'A::A(void*)'
    6 |   A(void* i=);  // { dg-error "with|specification|primary-expression" }
      |   ^
gcc/testsuite/g++.dg/other/pr39060.C:8:3: error: 'A::A(void*)' cannot be
overloaded with 'A::A(void*)'
    8 |   A(void* i=);  // { dg-error "overloaded|primary-expression" }
      |   ^
gcc/testsuite/g++.dg/other/pr39060.C:6:3: note: previous declaration
'A::A(void*)'
    6 |   A(void* i=);  // { dg-error "with|specification|primary-expression" }
      |   ^
gcc/testsuite/g++.dg/other/pr39060.C:10:8: error: 'void A::operator+(void*)'
cannot have default arguments
   10 |   void operator+ (void* i=);    // { dg-error "arguments" }
      |        ^~~~~~~~
gcc/testsuite/g++.dg/other/pr39060.C:12:21: error: expected identifier before
'=' token
   12 |   virtual void foo1(=); // { dg-error "identifier|primary-expression" }
      |                     ^
gcc/testsuite/g++.dg/other/pr39060.C:13:13: error: expected identifier before
'=' token
   13 |   void foo2(=);         // { dg-error "identifier|primary-expression" }
      |             ^
gcc/testsuite/g++.dg/other/pr39060.C:14:13: error: expected identifier before
'=' token
   14 |   void foo3(=);         // { dg-error "identifier|primary-expression" }
      |             ^
gcc/testsuite/g++.dg/other/pr39060.C:15:13: error: expected identifier before
'=' token
   15 |   void foo4(=);         // { dg-error "identifier|primary-expression" }
      |             ^
gcc/testsuite/g++.dg/other/pr39060.C:16:13: error: expected identifier before
'=' token
   16 |   void foo5(=);         // { dg-error "identifier|primary-expression" }
      |             ^
gcc/testsuite/g++.dg/other/pr39060.C:6:13: error: expected primary-expression
at end of input
    6 |   A(void* i=);  // { dg-error "with|specification|primary-expression" }
      |             ^
gcc/testsuite/g++.dg/other/pr39060.C:7:13: error: expected primary-expression
at end of input
    7 |   A(void* i=);  // { dg-error "overloaded|primary-expression" }
      |             ^
gcc/testsuite/g++.dg/other/pr39060.C:8:13: error: expected primary-expression
at end of input
    8 |   A(void* i=);  // { dg-error "overloaded|primary-expression" }
      |             ^
gcc/testsuite/g++.dg/other/pr39060.C:12:22: error: expected primary-expression
at end of input
   12 |   virtual void foo1(=); // { dg-error "identifier|primary-expression" }
      |                      ^
gcc/testsuite/g++.dg/other/pr39060.C:13:14: error: expected primary-expression
at end of input
   13 |   void foo2(=);         // { dg-error "identifier|primary-expression" }
      |              ^
gcc/testsuite/g++.dg/other/pr39060.C:14:14: error: expected primary-expression
at end of input
   14 |   void foo3(=);         // { dg-error "identifier|primary-expression" }
      |              ^
gcc/testsuite/g++.dg/other/pr39060.C:15:14: error: expected primary-expression
at end of input
   15 |   void foo4(=);         // { dg-error "identifier|primary-expression" }
      |              ^
gcc/testsuite/g++.dg/other/pr39060.C:16:14: error: expected primary-expression
at end of input
   16 |   void foo5(=);         // { dg-error "identifier|primary-expression" }
      |              ^
gcc/testsuite/g++.dg/other/pr39060.C:19:15: error: expected primary-expression
before ')' token
   19 | A::A (void* i=) {}      // { dg-error "primary-expression|argument" }
      |               ^
gcc/testsuite/g++.dg/other/pr39060.C:19:1: error: default argument given for
parameter 1 of 'A::A(void*)' [-fpermissive]
   19 | A::A (void* i=) {}      // { dg-error "primary-expression|argument" }
      | ^
gcc/testsuite/g++.dg/other/pr39060.C:6:3: note: previous specification in
'A::A(void*)' here
    6 |   A(void* i=);  // { dg-error "with|specification|primary-expression" }
      |   ^
gcc/testsuite/g++.dg/other/pr39060.C:19:15: internal compiler error: canonical
types differ for identical types 'void (A::)(void*)' and 'void (A::)(void*)'
   19 | A::A (void* i=) {}      // { dg-error "primary-expression|argument" }
      |               ^
0xb1c89f comptypes(tree_node*, tree_node*, int)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/typeck.c:1540
0x962596 duplicate_decls(tree_node*, tree_node*, bool, bool)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/decl.c:2378
0x96ad54 grokfndecl
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/decl.c:10097
0x970de5 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/decl.c:13860
0x973646 start_function(cp_decl_specifier_seq*, cp_declarator const*,
tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/decl.c:16795
0xa67eaf cp_parser_function_definition_from_specifiers_and_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/parser.c:29810
0xa67eaf cp_parser_init_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/parser.c:21555
0xa43cd8 cp_parser_simple_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/parser.c:14372
0xa715e5 cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/parser.c:14069
0xa72109 cp_parser_toplevel_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/parser.c:14098
0xa72109 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/parser.c:4936
0xa72109 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/cp/parser.c:45172
0xb9a22d c_common_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210221/work/gcc-11-20210221/gcc/c-family/c-opts.c:1218

I wonder if it is a duplicate of PR99285.

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

end of thread, other threads:[~2023-05-29 10:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-28 14:27 [Bug c++/99310] New: [11 Regression] ICE: canonical types differ for identical types 'void (A::)(void*)' and 'void (A::)(void*)' asolokha at gmx dot com
2021-03-01  9:31 ` [Bug c++/99310] " rguenth at gcc dot gnu.org
2021-04-27 11:40 ` [Bug c++/99310] [11/12 " jakub at gcc dot gnu.org
2021-07-28  7:06 ` rguenth at gcc dot gnu.org
2021-09-20  5:30 ` asolokha at gmx dot com
2022-04-21  7:48 ` rguenth at gcc dot gnu.org
2022-07-05 18:43 ` [Bug c++/99310] [11/12/13 " gscfq@t-online.de
2023-05-29 10:04 ` [Bug c++/99310] [11/12/13/14 " jakub 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).