This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Question with binary IO with g77 on windows and Bug with fputc
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Question with binary IO with g77 on windows and Bug with fputc
- From: Martin Kahlert <martin dot kahlert at mchp dot siemens dot de>
- Date: Mon, 17 Jan 2000 16:03:53 +0100
Hi!
I have a problem with g77 on WinNT (mingw) regarding binary output.
The program:
OPEN(77,FILE='TEST',ACCESS='SEQUENTIAL',FORM='FORMATTED')
WRITE(77,'(A1,$)') CHAR(10)
CLOSE(77)
END
If i compile it on Linux, i get a file 'TEST' with length 1,
on WinNT i get length 2 (containing CR+LF=char(13), char(10) )
How can i obtain a file with exactly the Byte 0x0A in it?
Here is a bug for you, i got by reading the g77 info pages:
OPEN(77,FILE='TEST',ACCESS='SEQUENTIAL',FORM='FORMATTED')
CALL FPUTC(77,CHAR(10))
CLOSE(77)
END
g77 -o q ~/q.f
../../../gcc-2.95.2/gcc/f/com.c:11439: failed assertion `expr != NULL'
g77: Internal compiler error: program f771 got fatal signal 6
This is 2.95.2 on Linux, but it's the same with the newest snapshot.
Thanks for every help,
Martin.