This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bug fc001



-- Walt Brainerd +1-877-355-6640 (voice & fax) The Fortran Company +1-520-760-1397 (outside USA) 6025 N. Wilmot Road walt@fortran.com Tucson, AZ 85750 USA http://www.fortran.com

program fc001

! Submitted by Walt Brainerd, The Fortran Company
! GNU Fortran 95 (GCC 4.1.0 20050322 (experimental))
! Windows XP

! INQUIRE says only units 5, 6 exist,
!    but open(11... works. This is wrong.
! Units 5 and 6 are preconnected, which
!    means that they are open, but all
!    units that can be used should exist.

   integer :: k
   logical :: ck
   do k = 1, 1000
      inquire(unit=k, exist=ck)
      if (ck) print *, "unit", k, ck
   end do
   open(11,file="xxx",status="replace", iostat=k)
   print *, "iostat", k

end program fc001

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]