Duuh! There's even a choice :-) Paul On Tue, 9 May 2023 at 19:29, Harald Anlauf wrote: > Hi Paul, > > On 5/9/23 18:00, Paul Richard Thomas via Gcc-patches wrote: > > Hi All, > > > > This problem caused the gimplifier failure because the reference chain > > ending in an inquiry_len still retained a full array reference. This had > > already been corrected for deferred character lengths but the fix extends > > this to all characters without a length expression and integer > expressions, > > which is the correct type of course, that retain a full array_spec. The > > nullification of the se->string length in conv_inquiry is a > > belts-and-braces measure to stop it from winding up as a hidden argument > in > > procedure calls. > > > > OK for trunk and, after a decent delay, backporting? > > ENOTESTCASE. > > Nevertheless the patch LGTM and is also OK for backporting. > > Thanks for fixing this! > > Harald > > > > Cheers > > > > Paul > > > > Fortran: Fix assumed length chars and len inquiry [PR103716] > > > > 2023-05-09 Paul Thomas > > > > gcc/fortran > > PR fortran/103716 > > * resolve.cc (gfc_resolve_ref): Conversion of array_ref into an > > element should be done for all characters without a len expr, > > not just deferred lens, and for integer expressions. > > * trans-expr.cc (conv_inquiry): For len and kind inquiry refs, > > set the se string_length to NULL_TREE. > > > > gcc/testsuite/ > > PR fortran/103716 > > * gfortran.dg/pr103716 : New test. > > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein