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]

Minor tweak to fold_binary_loc


Tested on x86_64-suse-linux, applied on the mainline as obvious.


2013-11-15  Eric Botcazou  <ebotcazou@adacore.com>

	* fold-const.c (fold_binary_loc) <comparisons>: Reuse local variable.


-- 
Eric Botcazou
Index: fold-const.c
===================================================================
--- fold-const.c	(revision 204835)
+++ fold-const.c	(working copy)
@@ -13824,8 +13824,7 @@ fold_binary_loc (location_t loc,
 		   and X >= signed_max+1 because previous transformations.  */
 		if (code == LE_EXPR || code == GT_EXPR)
 		  {
-		    tree st;
-		    st = signed_type_for (TREE_TYPE (arg1));
+		    tree st = signed_type_for (arg1_type);
 		    return fold_build2_loc (loc,
 					code == LE_EXPR ? GE_EXPR : LT_EXPR,
 					type, fold_convert_loc (loc, st, arg0),

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