Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 토론

Reading locksup when missing a ending quote

hinsbr
초급자
265 조회수
I was evaluating Intel Fortran when I noticed a possible bug. Code to duplicate the issue is as follows:

CHARACTER MyChar

OPEN(10,FILE='MyFile',STATUS='OLD',ERR=300)

DO I=1,150
READ(10,*,ERR=300,END=300) MyChar
ENDDO

300 CONTINUE

where my file would be of the form:

'1'
'2'
'3'
'4

Now the '4 is missing the trailing quote. The behavior I would expect, and have recieved from WATCOM and other compilers, is that the invalid '4 would cause the ERR=300 to be executed and jump to the 300 CONTINUE, but instead it just locks up.

Any thoughts?

Thanks,

Bryan
0 포인트
1 응답
Steven_L_Intel1
265 조회수
Bug. I'll report it.

I would expect the END= branch to be taken rather than ERR= but for your program it doesn't matter. Sorry for the inconvenience.
0 포인트
응답