[PATCH] Fix PR middle-end/33273

John David Anglin dave@hiauly1.hia.nrc.ca
Sun Sep 2 22:50:00 GMT 2007


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;
     }



More information about the Gcc-patches mailing list