https://gcc.gnu.org/bugzilla/show_bug.cgi?id=73142
--- Comment #2 from Günter Weber <gwebe...@t-online.de> --- Dear Harald, no, I wasn't aware of that. But using "/" does not fix the issue. Maybe it is instructive to look at the code that produces a data file which will then fail when you try to read it using namelist. (In the minimum example I considered only QCAP, as the error occurs already there). subroutine wtscpr implicit none integer i, j include 'pegscommons/cpcom.f' open(UNIT=31,FILE='pgs5job.ssl',STATUS='unknown') write(31,'(1H ,A)') '&SCPRDT' write(31,'(1H ,A)') 'QCAP=' write(31,'((1H ,7(F9.2,A)))') (QCAP(I),',',I=1,31) write(31,'(1H ,A,I5)') 'MXRAW=',MXRAW Write(31,'(1H ,A)') 'ELECNI=' write(31,'((1H ,7(1PE9.3,A)))') (ELECNI(I),',',I=1,MXRAW) write(31,'(1H ,A,I5)') 'MXSHEL=',MXSHEL write(31,'(1H ,A)') 'NSHELL=' write(31,'((1H ,14(I4,A)))') (NSHELL(I),',',I=1,MXRAW) write(31,'(1H ,A)') 'CAPIN=' write(31,'((1H ,5(1PE11.5,A)))') (CAPIN(I),',',I=1,MXRAW) write(31,'(1H ,A)') 'SCPROF=' do i=1,MXRAW+1 write(31,'((1H ,7(1PE9.3,A)))') (SCPROF(j,i),',',j=1,31) end do write(31,'(1H ,A)') '/END' endfile 31 close(31) return end