FORTRAN:
INQUIRE (by UNIT) for (un)formatted clause always returns YES.
See test file below:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
program fred
integer :: iunit
character(len=20) :: answer
!
iunit=20
open(iunit,file='fred',form='formatted',status='replace')
!write(iunit,*) '1'
!
inquire(iunit,unformatted=answer,iostat=ier)
if (ier /= 0) stop 'Eh?'
print*,'is_unformatted = ',answer
!
inquire(iunit,formatted=answer,iostat=ier)
if (ier /= 0) stop 'Eh?'
print*,'is_formatted = ',answer
end program fred
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Compiled code as "gfortran test.f90" on suse9 (64-bit) box
using 4.3.0 20070706 (experimental). I can understand INQUIRE
by FILE can be difficult to determine, but not by UNIT.
--
Summary: INQUIRE (by UNIT) for (un)formatted always returns
YES...
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pmason at ricardo dot com
GCC build triplet: gcc version 4.3.0 20070706
GCC host triplet: suse9 x86_64
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32646