https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101281
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> --- The main culprit is: subroutine ar3 (xn) bind(C) character(len=n) :: xn(:,:,:) end and I forgot to mention that 'n' is only implicitly defined - otherwise, there is not ICE.