]> gcc.gnu.org Git - gcc.git/commit
PR fortran/100154 - ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
authorHarald Anlauf <anlauf@gmx.de>
Sat, 24 Apr 2021 18:51:41 +0000 (20:51 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 27 Apr 2021 21:28:20 +0000 (23:28 +0200)
commite06c76270de946c56e9b38a7a87532d7eb72298a
tree15a0cef155f0642ba611922a7b6e5ede29e3bc2d
parenta633f7f96daac391fe0bc5d87427c0e7cf1ab1b3
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.

(cherry picked from commit d0e7833b94953ba6b4a915150666969ad9fc66af)
gcc/fortran/check.c
gcc/fortran/intrinsic.c
gcc/testsuite/gfortran.dg/pr100154.f90 [new file with mode: 0644]
This page took 0.072536 seconds and 6 git commands to generate.