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]

[PATCH] Fix PR45141


This fixes PR45141, we need to watch out for not handled base-addresses
(&CONST_DECL in our case).

Committed as obvious.

Richard.

2010-07-30  Richard Guenther  <rguenther@suse.de>

	PR middle-end/45141
	* expr.c (expand_expr_real_1): Check for not handled base address.

Index: gcc/expr.c
===================================================================
*** gcc/expr.c	(revision 162706)
--- gcc/expr.c	(working copy)
*************** expand_expr_real_1 (tree exp, rtx target
*** 8664,8670 ****
  	set_mem_attributes (temp, TMR_ORIGINAL (exp), 0);
  	set_mem_addr_space (temp, as);
  	base = get_base_address (TMR_ORIGINAL (exp));
! 	if (INDIRECT_REF_P (base)
  	    && TMR_BASE (exp)
  	    && TREE_CODE (TMR_BASE (exp)) == SSA_NAME
  	    && POINTER_TYPE_P (TREE_TYPE (TMR_BASE (exp))))
--- 8664,8671 ----
  	set_mem_attributes (temp, TMR_ORIGINAL (exp), 0);
  	set_mem_addr_space (temp, as);
  	base = get_base_address (TMR_ORIGINAL (exp));
! 	if (base
! 	    && INDIRECT_REF_P (base)
  	    && TMR_BASE (exp)
  	    && TREE_CODE (TMR_BASE (exp)) == SSA_NAME
  	    && POINTER_TYPE_P (TREE_TYPE (TMR_BASE (exp))))


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