This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Question with binary IO with g77 on windows and Bug with fputc


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]