diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/expr.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4f83eb6..4c51987 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-01-17 Richard Sandiford <richard.sandiford@linaro.org> + + PR middle-end/83884 + * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0) + rather than the size of inner_type to determine the stack slot size + when handling VIEW_CONVERT_EXPRs on strict-alignment targets. + 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com> PR target/83546 @@ -11145,11 +11145,11 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, } else if (STRICT_ALIGNMENT) { - tree inner_type = TREE_TYPE (treeop0); 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); + poly_uint64 temp_size = mode_size; + if (GET_MODE (op0) != BLKmode) + temp_size = upper_bound (temp_size, + GET_MODE_SIZE (GET_MODE (op0))); rtx new_rtx = assign_stack_temp_for_type (mode, temp_size, type); rtx new_with_op0_mode |