aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index abab831..a82d9e4 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -11132,9 +11132,10 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
else if (STRICT_ALIGNMENT)
{
tree inner_type = TREE_TYPE (treeop0);
- HOST_WIDE_INT temp_size
- = MAX (int_size_in_bytes (inner_type),
- (HOST_WIDE_INT) GET_MODE_SIZE (mode));
+ poly_uint64 mode_size = GET_MODE_SIZE (mode);
+ poly_uint64 op0_size
+ = tree_to_poly_uint64 (TYPE_SIZE_UNIT (inner_type));
+ poly_int64 temp_size = upper_bound (op0_size, mode_size);
rtx new_rtx
= assign_stack_temp_for_type (mode, temp_size, type);
rtx new_with_op0_mode