This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/73142] Reading a namelist fails - my code worked until 4.8.2
- From: "gweberbv at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Aug 2016 21:42:19 +0000
- Subject: [Bug fortran/73142] Reading a namelist fails - my code worked until 4.8.2
- Auto-submitted: auto-generated
- References: <bug-73142-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=73142
--- Comment #2 from Günter Weber <gweberbv@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