https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981
--- Comment #1 from G. Steinmetz <gs...@t-online.de> --- Works with character(kind=1) : $ cat z2.f90 program p integer, allocatable :: arr(:) integer :: stat character(len=128, kind=1) :: errmsg = ' ' allocate (arr(3), stat=stat, errmsg=errmsg) print *, allocated(arr), stat, trim(errmsg) end $ gfortran-9-20180527 z2.f90 -static-libgfortran $ a.out T 0