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]
Other format: [Raw text]

Possible g77 bug


Hello.

The code below doesn't work with g77 in either FreeBSD or Linux.
Try pressing Control-D and watch it loop forever.
It does work with the Compaq Fortran compiler.

g77 version: GNU Fortran 0.5.25 20010315 (release)
FreeBSD version: 4.6.2-RELEASE-p5
Linux version: 2.4.18

---------------------------------------------------------

      PROGRAM TEST
   10 READ (UNIT=*, FMT=*, IOSTAT=NERR, ERR=100) N
      PRINT *, 'You entered ', N
      GO TO 10
  100 IF (NERR .LT. 0) THEN
         PRINT *, 'EOF'
         STOP
      ENDIF
      PRINT *, 'Invalid input'
      GO TO 10
      END

---------------------------------------------------------

Regards,
Mats Peterson


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