https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46496
--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- (In reply to Tobias Burnus from comment #0) > f) The following two examples are invalid - but seemingly gfortran does not > check the string length of DT character components: > > module mytypes > use ISO_C_BINDING > implicit none > private > public T > type, bind(C) :: T > character(len=2,kind=C_CHAR) item ! INVALID length: 2 > end type T > end module mytypes > > module mytypes > use ISO_C_BINDING > implicit none > private > public T > type, bind(C) :: T > character(len=*,kind=C_CHAR) item*(2) ! INVALID length of 2 > end type T > end module mytypes This has been fixed with PR84073.