This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

g77 run-time error when using FILE='con'


Hi,

The 'con' device is a standard device under the MS-DOS COMMAND.COM shell but
using it with g77 causes an error. Other Windows f77 compilers e.g. Compaq Visual
Fortran,  work with the following test program but g77 produces a run-time error
(see below).

      PROGRAM TESTCON
      OPEN(29,FILE='con')
      WRITE(29,100)
100   FORMAT ('1USING con DEVICE')
      END

Using 'CON' or 'CON:' instead of 'con' produces the same error. While I realise
the obvious workaround would be to write to UNIT=* this would require major
changes to a large program developed under Unix which has been ported to
Windows/DOS systems using other compilers. Can you suggest some alternative to
allow the DOS console device to be associated with a specific UNIT?

Thanks.

Nick

Compilation:
C:\Users\Nick\wfn\g77\run>g77 -o testcon.exe testcon.for

Execution:
C:\Users\Nick\wfn\g77\run>testcon
write start: can't write file
apparent state: unit 29 named con
last format: (1USING con DEVICE)
lately writing sequential formatted external IO

abnormal program termination

g77 Version:
C:\Users\Nick\wfn\g77\run>g77 -v
g77 version 2.95 19990728 (release) (from FSF-g77 version 0.5.25 19990728 (relea
se))
Driving: C:\USERS\NICK\WFN\G77\F77G77\BIN\G77.EXE -v -c -xf77-version /dev/null
-xnone
G77.EXE: /dev/null: No such file or directory
Using builtin specs.
gcc version 2.95 19990728 (release)

System:
Windows 98 SE 4.10.2222A
Toshiba x86 Family 6 Model 8 Stepping 1
128.0MB RAM

-- 
Nick Holford, Divn Pharmacology & Clinical Pharmacology
University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand
email:n.holford@auckland.ac.nz tel:+64(9)373-7599x6730 fax:373-7556
http://www.phm.auckland.ac.nz/Staff/NHolford/nholford.htm


-- 
Nick Holford, Divn Pharmacology & Clinical Pharmacology
University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand
email:n.holford@auckland.ac.nz tel:+64(9)373-7599x6730 fax:373-7556
http://www.phm.auckland.ac.nz/Staff/NHolford/nholford.htm


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