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 fc007



-- 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 fc007

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

! This creates a file named "fort.-11"
!    and puts "Hello" in it

! Unit numbers are supposed to be nonnegative.

! Since the program is not standard, you are
!    free to do anything you like, but I would
!    think it better to give a runtime error
!    with a negative unit number, rather than
!    accept it; that is what Lahey and NAG do.
!    (Lahey even catches it at compile time.)

write(unit=-11, fmt=*) "Hello"

end program fc007

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