Intel v12 and v13 error out on conforming OPEN statement using NEWUNIT

Intel v12 and v13 error out on conforming OPEN statement using NEWUNIT

$ 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

publicaciones de 5 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Thanks - this has been escalated as issue DPD200238261.

Steve - Intel Developer Support

This has been fixed for a future release.

Steve - Intel Developer Support

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.

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.
 

Steve - Intel Developer Support

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya