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]

Re: Small change to expand_expr CONSTRUCTOR handling


Hi Richard,

Richard Kenner wrote:
This was motivated by a large Ada code. Tested on i686-pc-linux-gnu.

Mon May 19 16:03:53 2003 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>

	* expr.c (expand_expr, case CONSTRUCTOR): Put into memory if
	constant and EXPAND_CONST_ADDRESS, not just EXPAND_INITIALIZER.

*** gcc/expr.c.may16	Fri May 16 15:50:35 2003
--- gcc/expr.c	Fri May 16 15:51:45 2003
*************** expand_expr (exp, target, tmode, modifie
*** 6713,6717 ****
  			     TYPE_ALIGN (type)))
  			&& ! mostly_zeros_p (exp))))
! 	       || (modifier == EXPAND_INITIALIZER && TREE_CONSTANT (exp)))
  	{
  	  rtx constructor = output_constant_def (exp, 1);
--- 6713,6719 ----
  			     TYPE_ALIGN (type)))
  			&& ! mostly_zeros_p (exp))))
! 	       || ((modifier == EXPAND_INITIALIZER
! 		    || modifier == EXPAND_CONST_ADDRESS)
! 		   && TREE_CONSTANT (exp)))
  	{
  	  rtx constructor = output_constant_def (exp, 1);



It looks like you checked in more than just this patch, because
revision 1.540 of expr.c also contains the following changes which
are preventing bootstraps because CONTAINS_PLACEHOLDER_P is undefined.

1.540        (kenner   22-May-03): 	      if (CONTAINS_PLACEHOLDER_P (offset))
1.540        (kenner   22-May-03): 	  else if (CONTAINS_PLACEHOLDER_P (this_offset))
1.540        (kenner   22-May-03): 	  if (CONTAINS_PLACEHOLDER_P (index))
1.540        (kenner   22-May-03): 	  if (CONTAINS_PLACEHOLDER_P (unit_size))

Cheers
Graham



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