https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25829
--- Comment #36 from Nicolas Koenig <koenigni at gcc dot gnu.org> --- There seems to be a mismatch between the front end and the library. For program main integer :: id character(len=50) :: iomsg integer :: iostat id = 0 open(10,file="wait.dat",iostat=iostat,iomsg=iomsg, asynchronous="yes") wait (10,id=id) end program main the front end generates struct __st_parameter_wait wait_parm.1; wait_parm.1.common.filename = &"wait.f90"[1]{lb: 1 sz: 1}; wait_parm.1.common.line = 7; wait_parm.1.id = (integer(kind=4) *) (integer(kind=8)) id; wait_parm.1.common.flags = 128; wait_parm.1.common.unit = 10; _gfortran_st_wait (&wait_parm.1); where the type conversions are strange. The library then receives (gdb) p *wtp $1 = {common = {flags = 128, unit = 10, filename = 0x428d70 "wait.f90", line = 7, iomsg_len = 50, iomsg = 0x7fffffffdc90 "\377\377\377\377", iostat = 0x7fffffffdc8c}, id = 0x0, id_len = 8} so some adjustment of typedef struct { st_parameter_common common; CHARACTER1 (id); } st_parameter_wait; is probably required.