https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266
--- Comment #9 from kargl at gcc dot gnu.org --- (In reply to CVS Commits from comment #8) > The master branch has been updated by Tobias Burnus <bur...@gcc.gnu.org>: > > https://gcc.gnu.org/g:8950288333162caa68b85c71ed2d02f40976ddb9 > > commit r13-3338-g8950288333162caa68b85c71ed2d02f40976ddb9 > Author: Tobias Burnus <tob...@codesourcery.com> > Date: Mon Oct 17 18:15:16 2022 +0200 > > Fortran: Fixes for kind=4 characters strings [PR107266] > > PR fortran/107266 > > gcc/fortran/ > * trans-expr.cc (gfc_conv_string_parameter): Use passed > type to honor character kind. > * trans-types.cc (gfc_sym_type): Honor character kind. > * trans-decl.cc (gfc_conv_cfi_to_gfc): Fix handling kind=4 > character strings. > > gcc/testsuite/ > * gfortran.dg/char4_decl.f90: New test. > * gfortran.dg/char4_decl-2.f90: New test. Please commit the patch in comment #7. character(kind=4) is not interoperable (unless C_CHAR is CHARACTER(KIND=4) which it isn't). This is an extension and gfortran should flag.