summaryrefslogtreecommitdiff
path: root/gcc/config/pa/pa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/pa/pa.c')
-rw-r--r--gcc/config/pa/pa.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 2a54bdde266..b208215d36e 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -6112,7 +6112,7 @@ hppa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
u = fold_convert (sizetype, size_in_bytes (type));
u = fold_build1 (NEGATE_EXPR, sizetype, u);
- t = build2 (POINTER_PLUS_EXPR, valist_type, valist, u);
+ t = fold_build_pointer_plus (valist, u);
/* Align to 4 or 8 byte boundary depending on argument size. */
@@ -6124,10 +6124,7 @@ hppa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
ofs = (8 - size) % 4;
if (ofs != 0)
- {
- u = size_int (ofs);
- t = build2 (POINTER_PLUS_EXPR, valist_type, t, u);
- }
+ t = fold_build_pointer_plus_hwi (t, ofs);
t = fold_convert (ptr, t);
t = build_va_arg_indirect_ref (t);