Re: [PATCH] PR 78867 Function returning string ICE with -flto

2016-12-21 Thread FX
> 2016-12-21 Janne Blomqvist > > PR fortran/78867 > * trans-expr.c (gfc_conv_procedure_call): Emit DECL_EXPR also for > non-pointer character results. > > testsuite ChangeLog: > > 2016-12-21 Janne Blomqvist > > PR fortran/78867 > * gfortran.dg/string_length_4

[PATCH] PR 78867 Function returning string ICE with -flto

2016-12-21 Thread Janne Blomqvist
The fix for PR 78757 was slightly too cautious, and covered only the case of functions returning pointers to characters. By moving the block above the if statement the DECL_EXPR is created also for functions returning non-pointer characters. Regtested on x86_64-pc-linux-gnu, Ok for trunk? fortran