https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929
--- Comment #23 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Harald Anlauf from comment #3) > subroutine gfcbug138 (yerrmsg) > character(kind=1,len=*) :: yerrmsg > yerrmsg = 1_"bug: " // yerrmsg > end subroutine gfcbug138 [...] > gfcbug138 (character(kind=1)[1:_yerrmsg] & restrict yerrmsg, integer(kind=4) > _yerrmsg) I don't know anything about fortran and this isn't the best way to fix this bug, but I was wondering if, for this kind of ABI (passing an array with a pointer and a length IIUC), fortran guarantees that the length is non-negative? If that's the case, could the front-end convey that information to the middle-end using set_range_info or some other mechanism?