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

            Bug ID: 97878
           Summary: [9/10/11 Regression] ICE in
                    cxx_eval_outermost_constant_expr, at
                    cp/constexpr.c:6825
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to r7 :


$ cat z1.cc
extern int a[];
auto [b] {a};


$ g++-6 -c z1.cc
z1.cc:2:6: error: expected unqualified-id before '[' token
 auto [b] {a};
      ^

$ g++-11-20201115 -c z1.cc
z1.cc:2:12: internal compiler error: in cxx_eval_outermost_constant_expr, at
cp/constexpr.c:6825
    2 | auto [b] {a};
      |            ^
0x67e549 cxx_eval_outermost_constant_expr
        ../../gcc/cp/constexpr.c:6824
0x680c0c maybe_constant_value(tree_node*, tree_node*, bool)
        ../../gcc/cp/constexpr.c:7093
0x7cec1c store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../gcc/cp/typeck2.c:747
0x6c410d check_initializer
        ../../gcc/cp/decl.c:6909
0x6c552e cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.c:7827
0x72fde4 cp_parser_decomposition_declaration
        ../../gcc/cp/parser.c:14225
0x72fde4 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13867
0x75307a cp_parser_declaration
        ../../gcc/cp/parser.c:13640
0x75390a cp_parser_translation_unit
        ../../gcc/cp/parser.c:4806
0x75390a c_parse_file()
        ../../gcc/cp/parser.c:44595
0x81d252 c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1196

Reply via email to