gfortran console I/O quit working

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Sat Aug 4 05:42:00 GMT 2018


On 2018-08-03 22:30, Randy Dawson wrote:
> I recently upgraded/re-installed, and the following example used to work.
> uname reports:
> CYGWIN_NT-10.0
> -------------------------------
>          program test
>         write(6,700)
> 700     format('hello from write')
>         print *, 'hello from print'
>         end
> No compile errors with gfortran (gcc version 7.3.0)

To be compliant, you should start your format with "1x,".

Please show commands and output for compiling and running e.g.:

$ uname -a
CYGWIN_NT-10.0 TEST-F 2.10.0(0.325/5/3) 2018-02-02 15:16 x86_64 Cygwin
$ cat > test.f
	program test

	write(6,700)
700	format('hello from write')
	print *, 'hello from print'

	end
$ cat test.f
	program test

	write(6,700)
700	format('hello from write')
	print *, 'hello from print'

	end
$ gfortran --version
GNU Fortran (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gfortran -g -Og -Wall -Wextra -o test test.f
f951: Warning: Nonconforming tab character in column 1 of line 1 [-Wtabs]
f951: Warning: Nonconforming tab character in column 1 of line 3 [-Wtabs]
f951: Warning: Nonconforming tab character in column 4 of line 4 [-Wtabs]
f951: Warning: Nonconforming tab character in column 1 of line 5 [-Wtabs]
f951: Warning: Nonconforming tab character in column 1 of line 7 [-Wtabs]
$ ./test
hello from write
 hello from print
$

To provide good problem reports, please read and follow:

       http://cygwin.com/problems.html

mentioned below.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list