[Bug fortran/125902] -fc-prototypes incorrect for allocatable arrays and allocatable and assumed length character strings
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 26 17:17:53 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125902
--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:fdffb66e398d4440116a7d7834aae11053973ffe
commit r17-1924-gfdffb66e398d4440116a7d7834aae11053973ffe
Author: Harald Anlauf <anlauf@gmx.de>
Date: Thu Jun 25 22:55:47 2026 +0200
Fortran: -fc-prototypes, deferred shape and deferred length dummies
[PR125902]
Commit r17-1785 fixed the C prototypes emitted by -fc-prototypes for
procedure interfaces with deferred shape and deferred length dummies, but
did not consistently detect when "#include <ISO_Fortran_binding.h>" was
needed. Use common helper function to handle this.
PR fortran/125902
gcc/fortran/ChangeLog:
* dump-parse-tree.cc (needs_CFI_cdesc): New helper function to
determine when struct CFI_cdesc_t is used.
(has_cfi_cdesc): Use it here...
(get_c_type_name): ... and here.
gcc/testsuite/ChangeLog:
* gfortran.dg/c-prototypes_2.F90: New test.
More information about the Gcc-bugs
mailing list