Commit cb38fd88 by Richard Henderson Committed by Richard Henderson

expr.c (emit_block_move): Set memory block size as appropriate for the copy.

        * expr.c (emit_block_move): Set memory block size as appropriate
        for the copy.

From-SVN: r57233
parent bd055118
2002-09-16 Richard Henderson <rth@redhat.com> 2002-09-16 Richard Henderson <rth@redhat.com>
* expr.c (emit_block_move): Set memory block size as appropriate
for the copy.
2002-09-16 Richard Henderson <rth@redhat.com>
PR fortran/3924 PR fortran/3924
* sdbout.c (sdbout_symbol): Don't handle offsets from a symbol. * sdbout.c (sdbout_symbol): Don't handle offsets from a symbol.
......
...@@ -1733,6 +1733,16 @@ emit_block_move (x, y, size, method) ...@@ -1733,6 +1733,16 @@ emit_block_move (x, y, size, method)
if (size == 0) if (size == 0)
abort (); abort ();
/* Set MEM_SIZE as appropriate for this block copy. The main place this
can be incorrect is coming from __builtin_memcpy. */
if (GET_CODE (size) == CONST_INT)
{
x = shallow_copy_rtx (x);
y = shallow_copy_rtx (y);
set_mem_size (x, size);
set_mem_size (y, size);
}
if (GET_CODE (size) == CONST_INT && MOVE_BY_PIECES_P (INTVAL (size), align)) if (GET_CODE (size) == CONST_INT && MOVE_BY_PIECES_P (INTVAL (size), align))
move_by_pieces (x, y, INTVAL (size), align); move_by_pieces (x, y, INTVAL (size), align);
else if (emit_block_move_via_movstr (x, y, size, align)) else if (emit_block_move_via_movstr (x, y, size, align))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment