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

            Bug ID: 93789
           Summary: internal compiler error: in tree_to_uhwi, at
                    tree.c:7361
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: changochen1 at gmail dot com
  Target Milestone: ---

POC:
---
void f ( ) {
    const int tbl [ ( long ) "h" ] = { 12 };
}
---

Rum script:
---
cc1plus -o poc poc.c
---

Stack dump:
---
test1.c: In function ‘void f()’:                                               
                                                                               
                                                            [8/1813]
test1.c:2:43: internal compiler error: in tree_to_uhwi, at tree.c:7361
    2 |     const int tbl [ ( long ) "h" ] = { 12 };
      |                                           ^
0x8293cb tree_to_uhwi(tree_node const*)
        ../../gcc/tree.c:7361
0x8293cb tree_to_uhwi(tree_node const*)
        ../../gcc/tree.c:7359
0x94c9c9 reshape_init_array_1
        ../../gcc/cp/decl.c:6010
0x94b5b4 reshape_init(tree_node*, tree_node*, int)
        ../../gcc/cp/decl.c:6518
0x94d9dc check_initializer
        ../../gcc/cp/decl.c:6702
0x9712ce cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.c:7746
0xa17034 cp_parser_init_declarator
        ../../gcc/cp/parser.c:20828
0x9f8be0 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13678
0x9fa95a cp_parser_declaration_statement
        ../../gcc/cp/parser.c:13110
0x9fb566 cp_parser_statement
        ../../gcc/cp/parser.c:11423
0x9fc488 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.c:11789
0x9fc568 cp_parser_compound_statement
        ../../gcc/cp/parser.c:11739
0xa132d5 cp_parser_function_body
        ../../gcc/cp/parser.c:22981
0xa132d5 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/cp/parser.c:23032
0xa1662d cp_parser_function_definition_after_declarator
        ../../gcc/cp/parser.c:28880
0xa17636 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/cp/parser.c:28796
0xa17636 cp_parser_init_declarator
        ../../gcc/cp/parser.c:20596
0x9f8be0 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13678
...
---

Reply via email to