PR15966 - internal IO to arrays
Paul Thomas
paulthomas2@wanadoo.fr
Tue Jul 12 05:51:00 GMT 2005
Strictly speaking, pr15966 is fixed by Feng Wang's recent patches.
However, writing to array internal files is still broken because no
record length (aka character length) is being transmitted. This is
a bug that comes up in a number of NIST tests (eg. fm909.for tests
6, 7, 8, 10 & 22, 23, 25, 26.).
I commented in the PR but did not reopen it.
Jerry DeLisle and I are onto it. It needs the character length
adding to the ioparm structure and the right things doing with
the unix_streams in open_internal.
Paul T
With:
implicit none
integer :: i(10),j
character(12) :: r(12)
i = (/(j,j=1,10)/)
write(r,'(5(2x,i4/)/5(3x,i6/))') i
write(6,'(a12)') r
end
Intel and g95 do this
[root@localhost mytests]# ./a.out
1
2
3
4
5
6
7
8
9
10
whilst gfortran does.... well, something else
[root@localhost mytests]# ./a.out
1
2 3
4 5
6
7
8
9 1
0
More information about the Fortran
mailing list