Index: flang/runtime/namelist.cpp =================================================================== --- flang/runtime/namelist.cpp +++ flang/runtime/namelist.cpp @@ -383,7 +383,11 @@ next = io.GetNextNonBlank(byteCount); } } - if (!next || *next != '&') { + if (!next) { + handler.SignalEnd(); + return false; + } + if (*next != '&') { handler.SignalError( "NAMELIST input group does not begin with '&' (at '%lc')", *next); return false;