Re: [PATCH] PR 84740 Wrong string length type in bounds check

2018-01-10 Thread Janne Blomqvist
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) >> { >>

Re: [PATCH] PR 84740 Wrong string length type in bounds check

2018-01-10 Thread Jakub Jelinek
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, > -

[PATCH] PR 84740 Wrong string length type in bounds check

2018-01-10 Thread Janne Blomqvist
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