[PATCH] Fix PR39127, wrong gimple after omp-low

Richard Guenther rguenther@suse.de
Tue Feb 10 15:12:00 GMT 2009


In regimplify_operands we always have to check if the lhs requires
a new temporary for the rhs, not only if it changed (calling
regimplify_operands implies everything has possibly changed).

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

Richard.

2009-02-10  Richard Guenther  <rguenther@suse.de>

	PR middle-end/39127
	* gimplify.c (gimple_regimplify_operands): Always look if
	we need to create a temporary.

Index: gcc/gimplify.c
===================================================================
*** gcc/gimplify.c	(revision 144033)
--- gcc/gimplify.c	(working copy)
*************** gimple_regimplify_operands (gimple stmt,
*** 7463,7471 ****
  	}
  
        lhs = gimple_get_lhs (stmt);
!       /* If regimplification of the LHS changed it in a way that requires
! 	 a simple RHS, create temporary.  */
!       if (orig_lhs != lhs && !is_gimple_formal_tmp_var (lhs))
  	{
  	  bool need_temp = false;
  
--- 7463,7471 ----
  	}
  
        lhs = gimple_get_lhs (stmt);
!       /* If the LHS changed it in a way that requires a simple RHS,
! 	 create temporary.  */
!       if (lhs && !is_gimple_formal_tmp_var (lhs))
  	{
  	  bool need_temp = false;
  



More information about the Gcc-patches mailing list