diff options
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r-- | gcc/c-typeck.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index bd2d685f8bc..aeb6625a5ee 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -3789,11 +3789,10 @@ build_unary_op (location_t location, if (val && TREE_CODE (val) == INDIRECT_REF && TREE_CONSTANT (TREE_OPERAND (val, 0))) { - tree op0 = fold_convert_loc (location, sizetype, - fold_offsetof (arg, val)), op1; + tree op0 = fold_offsetof (arg, val), op1; op1 = fold_convert_loc (location, argtype, TREE_OPERAND (val, 0)); - ret = fold_build2_loc (location, POINTER_PLUS_EXPR, argtype, op1, op0); + ret = fold_build_pointer_plus_loc (location, op1, op0); goto return_build_unary_op; } |