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

Reading locksup when missing a ending quote

hinsbr
Beginner
266 Views
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 Kudos
1 Reply
Steven_L_Intel1
Employee
266 Views
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 Kudos
Reply