re PR target/43958 (FAIL: gcc.dg/ipa/ipa-pta-10.c scan-ipa-dump pta "ESCAPED = { }")
authorRichard Guenther <rguenther@suse.de>
Fri, 2 Jul 2010 20:51:58 +0000 (20:51 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 2 Jul 2010 20:51:58 +0000 (20:51 +0000)
PR target/43958
* config/pa/pa.c (hppa_gimplify_va_arg_expr): Use pointer arithmetic
for argument alignment.

From-SVN: r161746

gcc/ChangeLog
gcc/config/pa/pa.c

index 1f797b72fec060c9ef3f37a72e67d85180c40125..ef80e6e35a3a6c48028bf5fbc5c53a1fc85c5e88 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-02  Richard Guenther  <rguenther@suse.de>
+
+       PR target/43958
+       * config/pa/pa.c (hppa_gimplify_va_arg_expr): Use pointer arithmetic
+       for argument alignment.
+
 2010-07-02  Jan Hubicka  <jh@suse.cz>
 
        * ipa-split.c (verify_non_ssa_vars): Break out from ...; perform DFS walk
index 2640f05e1bcd1ead6c2b4927e370ebe6e92a0dec..a96bbacca3c3799630ed83218220bf1dc25ffad4 100644 (file)
@@ -6040,11 +6040,10 @@ hppa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
       u = fold_build1 (NEGATE_EXPR, sizetype, u);
       t = build2 (POINTER_PLUS_EXPR, valist_type, valist, u);
 
-      /* Copied from va-pa.h, but we probably don't need to align to
-        word size, since we generate and preserve that invariant.  */
-      u = size_int (size > 4 ? -8 : -4);
-      t = fold_convert (sizetype, t);
-      t = build2 (BIT_AND_EXPR, sizetype, t, u);
+      /* Align to 4 or 8 byte boundary depending on argument size.  */
+
+      u = build_int_cst (TREE_TYPE (t), (HOST_WIDE_INT)(size > 4 ? -8 : -4));
+      t = build2 (BIT_AND_EXPR, TREE_TYPE (t), t, u);
       t = fold_convert (valist_type, t);
 
       t = build2 (MODIFY_EXPR, valist_type, valist, t);