public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101405] New: internal compiler error: in reshape_init_class, at cp/decl.c:6483
@ 2021-07-10 20:37 carlo at gcc dot gnu.org
  2021-07-12 13:46 ` [Bug c++/101405] [12 Regression] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: carlo at gcc dot gnu.org @ 2021-07-10 20:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101405
           Summary: internal compiler error: in reshape_init_class, at
                    cp/decl.c:6483
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: carlo at gcc dot gnu.org
  Target Milestone: ---

Invalid code.

struct A {
  int const a = 1;
  int const b = 2;
};

struct B : A {
  using A::a;
  using A::b;
  int const c = 3;
  int const d = 4;
};

int main()
{
  [[maybe_unused]] B b =
  {
      .a = 10,
      .d = 42
  };
}

Result:

prog.cc: In function 'int main()':
prog.cc:19:3: internal compiler error: in reshape_init_class, at cp/decl.c:6483
   19 |   };
      |   ^
0x5ffc9b reshape_init_class
        ../../source/gcc/cp/decl.c:6483
0x5ffc9b reshape_init_r
        ../../source/gcc/cp/decl.c:6791
0x6b19ac reshape_init(tree_node*, tree_node*, int)
        ../../source/gcc/cp/decl.c:6867
0x6b3e12 check_initializer
        ../../source/gcc/cp/decl.c:7064
0x6c7978 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../source/gcc/cp/decl.c:8101
0x7823d7 cp_parser_init_declarator
        ../../source/gcc/cp/parser.c:22258
0x760a04 cp_parser_simple_declaration
        ../../source/gcc/cp/parser.c:14801
0x76282d cp_parser_declaration_statement
        ../../source/gcc/cp/parser.c:13936
0x762ba6 cp_parser_statement
        ../../source/gcc/cp/parser.c:12066
0x763d2d cp_parser_statement_seq_opt
        ../../source/gcc/cp/parser.c:12433
0x763de0 cp_parser_compound_statement
        ../../source/gcc/cp/parser.c:12382
0x78051a cp_parser_function_body
        ../../source/gcc/cp/parser.c:24448
0x78051a cp_parser_ctor_initializer_opt_and_function_body
        ../../source/gcc/cp/parser.c:24499
0x78174a cp_parser_function_definition_after_declarator
        ../../source/gcc/cp/parser.c:30572
0x7828ac cp_parser_function_definition_from_specifiers_and_declarator
        ../../source/gcc/cp/parser.c:30488
0x7828ac cp_parser_init_declarator
        ../../source/gcc/cp/parser.c:22020
0x760a04 cp_parser_simple_declaration
        ../../source/gcc/cp/parser.c:14801
0x78b715 cp_parser_declaration
        ../../source/gcc/cp/parser.c:14498
0x78c3a6 cp_parser_toplevel_declaration
        ../../source/gcc/cp/parser.c:14527
0x78c3a6 cp_parser_translation_unit
        ../../source/gcc/cp/parser.c:4958
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Tested on https://wandbox.org/permlink/I8cRHJ2jAk9Op94a

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

end of thread, other threads:[~2022-01-20 20:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-10 20:37 [Bug c++/101405] New: internal compiler error: in reshape_init_class, at cp/decl.c:6483 carlo at gcc dot gnu.org
2021-07-12 13:46 ` [Bug c++/101405] [12 Regression] " jakub at gcc dot gnu.org
2021-11-16 22:27 ` mpolacek at gcc dot gnu.org
2022-01-20 13:47 ` jason at gcc dot gnu.org
2022-01-20 14:52 ` ppalka at gcc dot gnu.org
2022-01-20 20:24 ` cvs-commit at gcc dot gnu.org
2022-01-20 20:29 ` jason 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).