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

Premature analysis of open statement

Neil_Carlson
Beginner
381 Views

Here's a silly little problem I don't believe I've reported before, but which probably ought to be fixed.  The 14.0.2 and earlier compilers all complain about the following code

[fortran]

program main

open(newunit=n,status='replace',file='foo')

end program

[/fortran]

reporting

intel-bug-20121024.f90(19): error #8414: If NEWUNIT appears in OPEN statement either FILE or STATUS (with value SCRATCH) specifiers must appear.   [STATUS]
open(newunit=n,status='replace',file='foo')
---------------^

Clearly the compiler is not completely parsing the OPEN statement before checking the constraints for NEWUNIT.  I see nothing in the standard that requires a particular order of the indentifiers.

0 Kudos
1 Reply
Neil_Carlson
Beginner
381 Views

Never mind.  By happenstance Steve recently replied to a very old topic started by dogunter, which I just read.  It turns out I did report this bug to my institutional HPC support and that was the basis for the old topic.  The issue ID is DPD200238261.

0 Kudos
Reply