This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix PR middle-end/47017


This is another installment in the "RTL expansion of MEM_REF" series.  To 
recap, after the initial merge, Richard tweaked it to unbreak IA-64/HP-UX:
  http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00514.html
which broke SPARC64/Linux.  So I reverted the above change and installed:
  http://gcc.gnu.org/ml/gcc-patches/2010-07/msg02144.html
instead, which pessimized x86.  So Jakub partially reverted it:
  http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00551.html
which broke SPARC64/Linux again (in exactly the same way as before).

The attached patchlet fixes again SPARC64/Linux by turning the call to 
convert_memory_address_addr_space into a call to memory_address_addr_space, 
which additionally makes sure that the memory address is valid.

Bootstrapped/regtested on SPARC64 and AMD64 Linux, applied on the mainline.


2011-01-03  Eric Botcazou  <ebotcazou@adacore.com>

	PR middle-end/47017
	* expr.c (expand_expr_real_1) <MEM_REF>: Call memory_address_addr_space
	instead of convert_memory_address_addr_space on the base expression.


-- 
Eric Botcazou
Index: expr.c
===================================================================
--- expr.c	(revision 168391)
+++ expr.c	(working copy)
@@ -8731,7 +8731,7 @@ expand_expr_real_1 (tree exp, rtx target
 	align = MAX (TYPE_ALIGN (TREE_TYPE (exp)),
 		     get_object_alignment (exp, BIGGEST_ALIGNMENT));
 	op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_SUM);
-	op0 = convert_memory_address_addr_space (address_mode, op0, as);
+	op0 = memory_address_addr_space (address_mode, op0, as);
 	if (!integer_zerop (TREE_OPERAND (exp, 1)))
 	  {
 	    rtx off

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]