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

            Bug ID: 89948
           Summary: [9 Regression] ICE in fold_convert_loc, at
                    fold-const.c:2430
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Changed between 20190217 and 20190224 :


$ cat z1.cc
void f ()
{
  int a = 0;
  for (;;)
    for (;a=+({break;1;});)
      {}
}


$ g++-9-20190217 -c z1.cc
$
$ g++-9-20190224 -c z1.cc
z1.cc: In function 'void f()':
z1.cc:5:25: internal compiler error: in fold_convert_loc, at fold-const.c:2430
    5 |     for (;a=+({break;1;});)
      |                         ^
0x91f287 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.c:2429
0x61f440 cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:4995
0x6200ac cxx_eval_store_expression
        ../../gcc/cp/constexpr.c:3678
0x61e18d cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:4582
0x6218d4 cxx_eval_outermost_constant_expr
        ../../gcc/cp/constexpr.c:5280
0x623c30 maybe_constant_value(tree_node*, tree_node*, bool)
        ../../gcc/cp/constexpr.c:5512
0x62e9b4 cp_fully_fold(tree_node*)
        ../../gcc/cp/cp-gimplify.c:2165
0x740c5b cp_build_binary_op(op_location_t const&, tree_code, tree_node*,
tree_node*, int)
        ../../gcc/cp/typeck.c:5539
0x742b1f build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, bool)
        ../../gcc/cp/typeck.c:4246
0x742b63 cp_truthvalue_conversion(tree_node*)
        ../../gcc/cp/typeck.c:5866
0x63317e ocp_convert(tree_node*, tree_node*, int, int, int)
        ../../gcc/cp/cvt.c:844
0x634247 cp_convert(tree_node*, tree_node*, int)
        ../../gcc/cp/cvt.c:637
0x634247 cp_convert_and_check(tree_node*, tree_node*, int)
        ../../gcc/cp/cvt.c:656
0x5f7df1 convert_like_real
        ../../gcc/cp/call.c:7372
0x5f8950 perform_implicit_conversion_flags(tree_node*, tree_node*, int, int)
        ../../gcc/cp/call.c:11089
0x738a5a condition_conversion(tree_node*)
        ../../gcc/cp/typeck.c:5878
0x71f1a4 maybe_convert_cond
        ../../gcc/cp/semantics.c:1010
0x71f1a4 finish_for_cond(tree_node*, tree_node*, bool, unsigned short)
        ../../gcc/cp/semantics.c:991
0x6d2690 cp_parser_c_for
        ../../gcc/cp/parser.c:12148
0x6d2690 cp_parser_for
        ../../gcc/cp/parser.c:12116

Reply via email to