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]

Yet another fix to COMPONENT_REF case


If we take the address of an array reference, we want the address of the
underlying object, not of a temporary, even if the array reference is, say,
TImode on a machine without a direct TImode load.  It's hard to make a
C test case for this.

The code in question is a real mess and is in need of a rewrite, which I
do plan to do.  Tested on alphaev56.

Tue Jul 10 07:27:53 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* expr.c (expand_expr, case COMPONENT_REF): Don't force using bitfield
	extraction if no direct load if either EXPAND_CONST_ADDRESS or
	EXPAND_INITIALIZER.

*** expr.c	2001/07/10 10:38:06	1.336
--- expr.c	2001/07/10 10:50:55
*************** expand_expr (exp, target, tmode, modifie
*** 7138,7142 ****
  	    || (mode1 != BLKmode && ! direct_load[(int) mode1]
  		&& GET_MODE_CLASS (mode) != MODE_COMPLEX_INT
! 		&& GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT)
  	    /* If the field isn't aligned enough to fetch as a memref,
  	       fetch it as a bit field.  */
--- 7138,7144 ----
  	    || (mode1 != BLKmode && ! direct_load[(int) mode1]
  		&& GET_MODE_CLASS (mode) != MODE_COMPLEX_INT
! 		&& GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT
! 		&& modifier != EXPAND_CONST_ADDRESS
! 		&& modifier != EXPAND_INITIALIZER)
  	    /* If the field isn't aligned enough to fetch as a memref,
  	       fetch it as a bit field.  */


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