1) Incorrect writing of formated files: nrp = 70 000 000 open(1, file = 'tst.dat') do i = 1, nrp write(1, '(6i10)') (i, k=1,6) enddo close(1) end
When file size reaches 2Gb, the last record is not added to file, but overwrites the previous one. As a result, the second half of information is lost. Incorrect reading. When the previous code has bee compiled with Absoft compiler, and the tst.dat file has been correctly created, the following code has beed compiled with gfortran and run. integer rd(6) nrp = 70 000 000 open(1, file = 'tst.dat') do i = 1, nrp read(1, '(6i10)') rd do k = 1, 6 if (rd(k) /= i) then write(*,*) i write(*,*) rd stop endif enddo enddo close(1) end It has reported error reading record 34636835. The read line was: 34636835 346334 0 0 0 0 Therefore, it is impossible to read files greater than 2 Gb. -- Summary: Incorrectly writes/reads formatted ASCII files greater than 2Gb Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: apotapov at math dot ualberta dot ca GCC build triplet: Same GCC host triplet: Windows XP Pro, Core2Quad Q6600, 2Gb RAM GCC target triplet: Same http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40812