diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-04-23 20:19:39 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-04-23 20:19:39 +0000 |
commit | a689171e506f55ab8fb336af3b816272f4209af0 (patch) | |
tree | 9f62d5a18312e9395a702a2f51c84dabac0256ef /gcc/expr.c | |
parent | 53de8a7e13cae771fdcda36abee4787bd6575ed7 (diff) | |
download | gcc-a689171e506f55ab8fb336af3b816272f4209af0.zip gcc-a689171e506f55ab8fb336af3b816272f4209af0.tar.gz gcc-a689171e506f55ab8fb336af3b816272f4209af0.tar.bz2 |
re PR middle-end/85496 (internal compiler error: in emit_move_insn, at expr.c:3722)
PR middle-end/85496
* expr.c (store_field): In the bitfield case, if the value comes from
a function call and is returned in registers by means of a PARALLEL,
do not change the mode of the temporary unless BLKmode and VOIDmode.
From-SVN: r259574
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6989,8 +6989,9 @@ store_field (rtx target, poly_int64 bitsize, poly_int64 bitpos, if (GET_CODE (temp) == PARALLEL) { HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp)); - scalar_int_mode temp_mode - = smallest_int_mode_for_size (size * BITS_PER_UNIT); + machine_mode temp_mode = GET_MODE (temp); + if (temp_mode == BLKmode || temp_mode == VOIDmode) + temp_mode = smallest_int_mode_for_size (size * BITS_PER_UNIT); rtx temp_target = gen_reg_rtx (temp_mode); emit_group_store (temp_target, temp, TREE_TYPE (exp), size); temp = temp_target; |