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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The bogus pattern is there on all branches, and it should

  else if (TREE_CODE (t) == MEM_REF
           && integer_zerop (TREE_OPERAND (t, 1)))
    {
      t = TREE_OPERAND (t, 0);

      if (TREE_TYPE (t) != ptrtype)
        t = fold_convert_loc (loc, ptrtype, t);
    }
  else if (TREE_CODE (t) == MEM_REF
           && TREE_CODE (TREE_OPERAND (t, 0)) == INTEGER_CST)
    return fold_binary (POINTER_PLUS_EXPR, ptrtype,
                        TREE_OPERAND (t, 0),
                        convert_to_ptrofftype (TREE_OPERAND (t, 1)));

So I'll revise I guess.

Reply via email to