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]

PR opt/11635


Hi,
PR opt/11635 is about dead memory store caused by the fact that we
assign stack slot to proactively in union casts.

2004-01-10  Jan Hubicka  <jh@suse.cz>
	PR opt/11635
	* expr.c (expand_expr_real):  More curefully expand union casts.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.613
diff -c -3 -p -r1.613 expr.c
*** expr.c	9 Jan 2004 19:54:53 -0000	1.613
--- expr.c	10 Jan 2004 13:01:19 -0000
*************** expand_expr_real (tree exp, rtx target, 
*** 7509,7515 ****
  	    }
  
  	  if (target == 0)
! 	    target = assign_temp (type, 0, 1, 1);
  
  	  if (GET_CODE (target) == MEM)
  	    /* Store data into beginning of memory target.  */
--- 7509,7520 ----
  	    }
  
  	  if (target == 0)
! 	    {
! 	      if (TYPE_MODE (type) != BLKmode)
! 		target = gen_reg_rtx (TYPE_MODE (type));
! 	      else
! 		target = assign_temp (type, 0, 1, 1);
! 	    }
  
  	  if (GET_CODE (target) == MEM)
  	    /* Store data into beginning of memory target.  */


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