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]

expr.c buglet


This was where the original MEM had unchanging, but there was nothing
justifying the expression itself to do so.  The intent was to inherit
that flag from the old MEM and most cases did, but not this one.

Thu Sep 14 12:10:16 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* expr.c (expand_expr, case COMPONENT_EXPR): Copy memory attributes
	when making new MEM.

*** expr.c	2000/09/12 23:45:51	1.258
--- expr.c	2000/09/14 15:53:42
*************** expand_expr (exp, target, tmode, modifie
*** 6940,6945 ****
  	if (modifier == EXPAND_CONST_ADDRESS
  	    || modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER)
! 	  op0 = gen_rtx_MEM (mode1, plus_constant (XEXP (op0, 0),
! 						   (bitpos / BITS_PER_UNIT)));
  	else
  	  op0 = change_address (op0, mode1,
--- 6940,6951 ----
  	if (modifier == EXPAND_CONST_ADDRESS
  	    || modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER)
! 	  {
! 	    rtx new = gen_rtx_MEM (mode1,
! 				   plus_constant (XEXP (op0, 0),
! 						  (bitpos / BITS_PER_UNIT)));
! 
! 	    MEM_COPY_ATTRIBUTES (new, op0);
! 	    op0 = new;
! 	  }
  	else
  	  op0 = change_address (op0, mode1,

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