diff options
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7708,6 +7708,11 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode, modifier == EXPAND_INITIALIZER ? EXPAND_INITIALIZER : EXPAND_NORMAL); + /* expand_expr is allowed to return an object in a mode other + than TMODE. If it did, we need to convert. */ + if (GET_MODE (tmp) != VOIDmode && tmode != GET_MODE (tmp)) + tmp = convert_modes (tmode, GET_MODE (tmp), + tmp, TYPE_UNSIGNED (TREE_TYPE (offset))); result = convert_memory_address_addr_space (tmode, result, as); tmp = convert_memory_address_addr_space (tmode, tmp, as); |