This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR middle-end/33273
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 2 Sep 2007 17:50:28 -0400 (EDT)
- Subject: [PATCH] Fix PR middle-end/33273
Hi,
This patch fixes a regression caused by calling clear_storage with
a target MEM with the wrong mode. The audit trail has the details.
Tested on hppa-unknown-linux-gnu with no regressions.
OK for mainline?
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2007-09-02 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR middle-end/33273
* expr.c (store_expr): Call adjust_address to change mode of dest_mem
to BLKmode.
Index: expr.c
===================================================================
--- expr.c (revision 128023)
+++ expr.c (working copy)
@@ -4523,7 +4523,8 @@
MEM_ALIGN (target), false,
exp_len > str_copy_len ? 1 : 0);
if (exp_len > str_copy_len)
- clear_storage (dest_mem, GEN_INT (exp_len - str_copy_len),
+ clear_storage (adjust_address (dest_mem, BLKmode, 0),
+ GEN_INT (exp_len - str_copy_len),
BLOCK_OP_NORMAL);
return NULL_RTX;
}