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: [PATCH] Fix PR38745


On Fri, 23 Jan 2009, Richard Guenther wrote:

> 
> This fixes PR38745 by making sure not to rewrite register type,
> non-addressed variables into SSA if they are component-referenced.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu, I'll wait for
> some expected comments before applying this ;)

It turns out this broke g++.dg/torture/pr36191.C with -m32.  The
following fixed that.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2009-01-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38745
	* tree-ssa-alias.c (update_alias_info_1): Exclude RESULT_DECL
	from special handling.

Index: gcc/tree-ssa-alias.c
===================================================================
*** gcc/tree-ssa-alias.c	(revision 143673)
--- gcc/tree-ssa-alias.c	(working copy)
*************** update_alias_info_1 (gimple stmt, struct
*** 2494,2499 ****
--- 2494,2501 ----
  	{
  	  tree var = get_base_address (lhs);
  	  if (DECL_P (var)
+ 	      /* We are not going to mess with RESULT_DECL anyway.  */
+ 	      && TREE_CODE (var) != RESULT_DECL
  	      && is_gimple_reg_type (TREE_TYPE (var)))
  	    bitmap_set_bit (gimple_addressable_vars (cfun), DECL_UID (var));
  	}


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