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

            Bug ID: 96370
           Summary: ice with -ffast-math
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Recent gcc trunk, with this C source code:

a() {
  _Decimal128 b;
  c(-b * b);
}

and compiler flag -O2 -ffast-math, does this:

during GIMPLE pass: reassoc
bug633.c: In function ‘a’:
bug633.c:1:1: internal compiler error: in gimple_build_assign_1, at
gimple.c:455
    1 | a() {
      | ^
0x96e82e gimple_build_assign_1(tree_node*, tree_code, tree_node*, tree_node*,
tr
ee_node*)
        ../../trunk.git/gcc/gimple.c:455
0xec0a0b rewrite_expr_tree(gimple*, unsigned int, vec<operand_entry*, va_heap,
v
l_ptr>, bool, bool)
        ../../trunk.git/gcc/tree-ssa-reassoc.c:4963
0xec0828 rewrite_expr_tree(gimple*, unsigned int, vec<operand_entry*, va_heap,
v
l_ptr>, bool, bool)
        ../../trunk.git/gcc/tree-ssa-reassoc.c:5007
0xeb6d9e reassociate_bb(basic_block_def*)
        ../../trunk.git/gcc/tree-ssa-reassoc.c:6480

The bug seems to have existed since sometime before 20200630.

Thanks to cvise for reducing the code quickly.

Reply via email to