Possible g77 bug
Mats Peterson
mats@snowbee.dyns.cx
Thu Dec 19 17:32:00 GMT 2002
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
More information about the Gcc-bugs
mailing list