Hi Harald, It looks good to me! Keep clear of 11-branch until release but OK for the others.
Thanks Paul On Fri, 23 Apr 2021 at 00:18, Harald Anlauf via Fortran <fort...@gcc.gnu.org> wrote: > Now with the correct patch attached ... > > Sorry for the confusion! > > --- > > Dear Fortranners, > > we need to check the arguments to the affected GNU intrinsic extensions > properly, and - as pointed out in the PR by Tobias - we need to allow > function references that have a data pointer result. Also the argument > names of the character arguments of the subroutine versions needed a > fix ("c" instead of "count"). > > Regtested on x86_64-pc-linux-gnu. OK for mainline (12)? > OK for backports after 11.1 release? > > Thanks, > Harald > > > PR fortran/100154 - ICE in gfc_conv_procedure_call, at > fortran/trans-expr.c:6131 > > Add appropriate static checks for the character and status arguments to > the GNU Fortran intrinsic extensions fget[c], fput[c]. Extend variable > check to allow a function reference having a data pointer result. > > gcc/fortran/ChangeLog: > > PR fortran/100154 > * check.c (variable_check): Allow function reference having a data > pointer result. > (arg_strlen_is_zero): New function. > (gfc_check_fgetputc_sub): Add static check of character and status > arguments. > (gfc_check_fgetput_sub): Likewise. > * intrinsic.c (add_subroutines): Fix argument name for the > character argument to intrinsic subroutines fget[c], fput[c]. > > gcc/testsuite/ChangeLog: > > PR fortran/100154 > * gfortran.dg/pr100154.f90: New test. > > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein