One simple switch to wi::add and one simplification that became possible
after Kenny's patch to remove the other real_from_integer.

Tested on x86_64-linux-gnu and applied as obvious (I hope).

Thanks,
Richard


Index: gcc/objc/objc-act.c
===================================================================
--- gcc/objc/objc-act.c 2013-11-20 12:04:28.937491368 +0000
+++ gcc/objc/objc-act.c 2013-11-20 13:35:05.663472662 +0000
@@ -4885,7 +4885,8 @@ objc_decl_method_attributes (tree *node,
                  number = TREE_VALUE (second_argument);
                  if (number && TREE_CODE (number) == INTEGER_CST)
                    TREE_VALUE (second_argument)
-                     = wide_int_to_tree (TREE_TYPE (number), wide_int (number) 
+ 2);
+                     = wide_int_to_tree (TREE_TYPE (number),
+                                         wi::add (number, 2));
 
                  /* This is the third argument, the "first-to-check",
                     which specifies the index of the first argument to
@@ -4895,7 +4896,8 @@ objc_decl_method_attributes (tree *node,
                  number = TREE_VALUE (third_argument);
                  if (number && TREE_CODE (number) == INTEGER_CST)
                    TREE_VALUE (third_argument)
-                     = wide_int_to_tree (TREE_TYPE (number), wide_int (number) 
+ 2);
+                     = wide_int_to_tree (TREE_TYPE (number),
+                                         wi::add (number, 2));
                }
              filtered_attributes = chainon (filtered_attributes,
                                             new_attribute);
@@ -4930,7 +4932,8 @@ objc_decl_method_attributes (tree *node,
                  if (number && TREE_CODE (number) == INTEGER_CST
                      && !wi::eq_p (number, 0))
                    TREE_VALUE (argument)
-                     = wide_int_to_tree (TREE_TYPE (number), wide_int (number) 
+ 2);
+                     = wide_int_to_tree (TREE_TYPE (number),
+                                         wi::add (number, 2));
                  argument = TREE_CHAIN (argument);
                }
 
Index: gcc/tree.c
===================================================================
--- gcc/tree.c  2013-11-20 12:55:04.109302505 +0000
+++ gcc/tree.c  2013-11-20 13:35:05.677472558 +0000
@@ -1711,8 +1711,8 @@ real_value_from_int_cst (const_tree type
      bitwise comparisons to see if two values are the same.  */
   memset (&d, 0, sizeof d);
 
-  real_from_integer (&d, type ? TYPE_MODE (type) : VOIDmode,
-                    wide_int (i), TYPE_SIGN (TREE_TYPE (i)));
+  real_from_integer (&d, type ? TYPE_MODE (type) : VOIDmode, i,
+                    TYPE_SIGN (TREE_TYPE (i)));
   return d;
 }
 

Reply via email to