public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/107575] New: ICE: tree check: expected tree that contains 'decl common' structure, have 'error_mark' in duplicate_decls, at cp/decl.cc:2605
Date: Tue, 08 Nov 2022 17:26:56 +0000	[thread overview]
Message-ID: <bug-107575-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 107575
           Summary: ICE: tree check: expected tree that contains 'decl
                    common' structure, have 'error_mark' in
                    duplicate_decls, at cp/decl.cc:2605
           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: ---

Started with r11 :


$ cat z1.cc
void f (void) {
  virtual int f(void) const;
  virtual int f(void);
}


$ g++-13-20221106 -c z1.cc
z1.cc: In function 'void f()':
z1.cc:2:3: error: 'virtual' outside class declaration
    2 |   virtual int f(void) const;
      |   ^~~~~~~
z1.cc:2:23: error: non-member function 'int f()' cannot have cv-qualifier
    2 |   virtual int f(void) const;
      |                       ^~~~~
z1.cc: At global scope:
z1.cc:2:15: error: ambiguating new declaration of 'int f()'
    2 |   virtual int f(void) const;
      |               ^
z1.cc:1:6: note: old declaration 'void f()'
    1 | void f (void) {
      |      ^
z1.cc: In function 'void f()':
z1.cc:3:3: error: 'virtual' outside class declaration
    3 |   virtual int f(void);
      |   ^~~~~~~
z1.cc:3:21: internal compiler error: tree check: expected tree that contains
'decl common' structure, have 'error_mark' in duplicate_decls, at
cp/decl.cc:2605
    3 |   virtual int f(void);
      |                     ^
0x70381d tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ../../gcc/tree.cc:9020
0x8e2b53 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:3646
0x8e2b53 duplicate_decls(tree_node*, tree_node*, bool, bool)
        ../../gcc/cp/decl.cc:2605
0x9d1ba3 pushdecl(tree_node*, bool)
        ../../gcc/cp/name-lookup.cc:3686
0x8f026c start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc/cp/decl.cc:5776
0xa32749 cp_parser_init_declarator
        ../../gcc/cp/parser.cc:22757
0xa05e62 cp_parser_simple_declaration
        ../../gcc/cp/parser.cc:15288
0xa07a19 cp_parser_declaration_statement
        ../../gcc/cp/parser.cc:14369
0xa080db cp_parser_statement
        ../../gcc/cp/parser.cc:12440
0xa09204 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.cc:12857
0xa092e7 cp_parser_compound_statement
        ../../gcc/cp/parser.cc:12809
0xa31760 cp_parser_function_body
        ../../gcc/cp/parser.cc:25183
0xa31760 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/cp/parser.cc:25234
0xa31dda cp_parser_function_definition_after_declarator
        ../../gcc/cp/parser.cc:31392
0xa3331c cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/cp/parser.cc:31309
0xa3331c cp_parser_init_declarator
        ../../gcc/cp/parser.cc:22637
0xa05e62 cp_parser_simple_declaration
        ../../gcc/cp/parser.cc:15288
0xa3aceb cp_parser_declaration
        ../../gcc/cp/parser.cc:14974
0xa3b808 cp_parser_translation_unit
        ../../gcc/cp/parser.cc:5080
0xa3b808 c_parse_file()
        ../../gcc/cp/parser.cc:48817

             reply	other threads:[~2022-11-08 17:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 17:26 gscfq@t-online.de [this message]
2022-11-21 12:06 ` [Bug c++/107575] ICE: tree check: expected tree that contains 'decl common' structure, have 'error_mark' in duplicate_decls, at cp/decl.cc:2605 since r12-8115-g791a968630b3846b marxin at gcc dot gnu.org
2022-11-21 16:26 ` [Bug c++/107575] [12/13 Regression] " pinskia at gcc dot gnu.org
2022-12-20 15:35 ` rguenth at gcc dot gnu.org
2023-05-08 12:25 ` [Bug c++/107575] [12/13/14 " rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107575-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).