http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45943
Summary: gfortran.dg/streamio_16.f90: Fails under MinGW64 -
probably \r\n vs \n issue
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
On MinGW64, the test case fails as follows:
PASS: gfortran.dg/streamio_16.f90 (test for excess errors)
spawn [open ...]
This application has requested the Runtime to terminate it in an unusual way.
I assume that this is due to the difference between LF and CRLF as the file is
a formatted stream:
open(50, access="stream", form="formatted")
write(50, *, pos=1) "Just something "
[...]
read( 50, *,pos=i)
inquire(50, access=sAccess, pos=mypos)
if (mypos.ne.18) call abort
On Linux, the file fort.50 contains:
0000000 sp J u s t sp s o m e t h i n g sp
0000020 nl
0000021
Thus "nl" is at position 17.
As Kai tested: Using "if (mypos.ne.19) call abort" with 19 instead of 18 works
on MinGW64.