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

            Bug ID: 102455
           Summary: ICE in verify_ctor_sanity, at cp/constexpr.c:4451
           Product: gcc
           Version: 12.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 at least r5 (with -std=c++14) :


$ cat z1.cc
typedef int v4si;
typedef float v4sf __attribute__ ((vector_size(4)));
constexpr v4sf foo (v4si) { for (;;) {} }
template <class> constexpr v4sf b = foo (v4si {});


$ g++-12-20210919 -c z1.cc
z1.cc:4:49: internal compiler error: in verify_ctor_sanity, at
cp/constexpr.c:4451
    4 | template <class> constexpr v4sf b = foo (v4si {});
      |                                                 ^
0x6e1221 verify_ctor_sanity
        ../../gcc/cp/constexpr.c:4450
0x6ef919 cxx_eval_bare_aggregate
        ../../gcc/cp/constexpr.c:4493
0x6e5e73 cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6793
0x6e353b cxx_bind_parameters_in_call
        ../../gcc/cp/constexpr.c:1644
0x6e353b cxx_eval_call_expression
        ../../gcc/cp/constexpr.c:2617
0x6e7174 cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6336
0x6e5bb5 cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6828
0x6e964b cxx_eval_outermost_constant_expr
        ../../gcc/cp/constexpr.c:7368
0x6ec82a fold_non_dependent_expr_template
        ../../gcc/cp/constexpr.c:7720
0x87abb4 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../gcc/cp/typeck2.c:777
0x73210d check_initializer
        ../../gcc/cp/decl.c:7277
0x734457 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.c:8077
0x7f3caf cp_parser_init_declarator
        ../../gcc/cp/parser.c:22665
0x7f6ba6 cp_parser_single_declaration
        ../../gcc/cp/parser.c:31569
0x7f6dc5 cp_parser_template_declaration_after_parameters
        ../../gcc/cp/parser.c:31134
0x7f758b cp_parser_explicit_template_declaration
        ../../gcc/cp/parser.c:31400
0x7f758b cp_parser_template_declaration_after_export
        ../../gcc/cp/parser.c:31419
0x7f97e9 cp_parser_declaration
        ../../gcc/cp/parser.c:14750
0x7fa4ab cp_parser_translation_unit
        ../../gcc/cp/parser.c:4978
0x7fa4ab c_parse_file()
        ../../gcc/cp/parser.c:47694

Reply via email to