builtins.c (std_gimplify_va_arg_expr): Widen align/boundary to HOST_WIDE_INT.
authorRichard Henderson <rth@redhat.com>
Sat, 10 Jul 2004 18:47:36 +0000 (11:47 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 10 Jul 2004 18:47:36 +0000 (11:47 -0700)
        * builtins.c (std_gimplify_va_arg_expr): Widen align/boundary
        to HOST_WIDE_INT.  Fold pad-args-down arithmetic.

From-SVN: r84469

gcc/ChangeLog
gcc/builtins.c

index 87c42b826e07b3086190c6d519b98bdffe04fac9..e6d9dd85dbc86446d48c3ae2b44b214586c9ee9e 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-10  Richard Henderson  <rth@redhat.com>
+
+       * builtins.c (std_gimplify_va_arg_expr): Widen align/boundary
+       to HOST_WIDE_INT.  Fold pad-args-down arithmetic.
+
 2004-07-10  Jakub Jelinek  <jakub@redhat.com>
 
        * expr.h (store_bit_field, extract_bit_field): Remove last argument.
index 7c9334ba3fbe1896ead22403be2a33e9c3748eb9..02fdc929b41b97a3bf1171cef5bc12b61a2c9126 100644 (file)
@@ -4474,7 +4474,7 @@ tree
 std_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
 {
   tree addr, t, type_size, rounded_size, valist_tmp;
-  unsigned int align, boundary;
+  unsigned HOST_WIDE_INT align, boundary;
 
 #ifdef ARGS_GROW_DOWNWARD
   /* All of the alignment and movement below is for args-grow-up machines.
@@ -4520,7 +4520,7 @@ std_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
       t = fold (build3 (COND_EXPR, sizetype, t, size_zero_node,
                        size_binop (MINUS_EXPR, rounded_size, type_size)));
       t = fold_convert (TREE_TYPE (addr), t);
-      addr = build2 (PLUS_EXPR, TREE_TYPE (addr), addr, t);
+      addr = fold (build2 (PLUS_EXPR, TREE_TYPE (addr), addr, t));
     }
 
   /* Compute new value for AP.  */