http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60115

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is that tree_could_trap_p, while handling

    case ARRAY_REF:
      base = TREE_OPERAND (expr, 0);
      if (tree_could_trap_p (base))
        return true;
      if (TREE_THIS_NOTRAP (expr))
        return false;
      return !in_array_bounds_p (expr);

doesn't handle out-of-bound accesses via MEM_REF at all.

    case MEM_REF:
      if (TREE_CODE (TREE_OPERAND (expr, 0)) == ADDR_EXPR)
        return false;

I have a fix.

Reply via email to