On Wed, Jan 10, 2018 at 1:21 PM, Jakub Jelinek wrote:
> On Wed, Jan 10, 2018 at 01:18:46PM +0200, Janne Blomqvist wrote:
>
> Thanks for fixing this PR.
>
>> @@ -1562,7 +1562,8 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock,
>> tree desc,
>> if (first_len)
>> {
>>
On Wed, Jan 10, 2018 at 01:18:46PM +0200, Janne Blomqvist wrote:
Thanks for fixing this PR.
> @@ -1562,7 +1562,8 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock,
> tree desc,
> if (first_len)
> {
> gfc_add_modify (&se->pre, first_len_val,
> -
Need to convert the RHS to the type of the LHS when assigning.
Regtested on x86_64-pc-linux-gnu, committed as obvious.
gcc/fortran/ChangeLog:
2018-01-10 Janne Blomqvist
PR fortran/84740
* trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
LHS type when a