- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
$ ifort --version
ifort (IFORT) 13.0.1 20121010
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
$ cat intel-bug-20121024.f90
!!
!! INCORRECT ANALYSIS OF OPEN STATEMENT
!!
program main
open(newunit=n,status='replace',file='foo')
end program
$ ifort intel-bug-20121024.f90
intel-bug-20121024.f90(21): 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')
---------------^
compilation aborted for intel-bug-20121024.f90 (code 1)
Note that if the order of the key/value pairs is changed, the code will correctly compile, i.e. this works:
open(newunit=n,file='foo',status='replace')
-david
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been fixed for a future release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using ifort v14.0.0 and still seeing a similar error:
OPEN (UNIT = newunit(lfile), STATUS = "OLD", FORM = "formatted", FILE = "file.txt")
returns the error
error #8414: If NEWUNIT appears in OPEN statement either FILE or STATUS (with value SCRATCH) specifiers must appear. [STATUS]
I can get around this by using an INQUIRE, but I believe this code should compile fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fix is in for the next major release after 14.0, due later this year. My post about a future release was made after 14.0.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page