This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60596] Inquire size for stream zero
- From: "patnel97269-gfortran at yahoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 20 Mar 2014 04:25:16 +0000
- Subject: [Bug fortran/60596] Inquire size for stream zero
- Auto-submitted: auto-generated
- References: <bug-60596-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60596
--- Comment #4 from patnel97269-gfortran at yahoo dot fr ---
Ok so if I understand well, for gfortran once the input_unit is closed, the
unit number corresponding to input_unit can be used for another file. But, the
input_unit is defined to be the standard input.
1) If one wants to reconnect to standard input socket (/dev or /proc) how to
find out with gfortran without knowing the file path ?
2) it is allowed to change some properties of an already connected unit by
calling the open function again without closing first.
When i do so , using
open(unit=input_unit,status='old' ,access='stream')
inquire(unit=input_unit,name=nm)
print *,nm
inquire(unit=input_unit,size=sz)
I get :
At line 26 of file test2.f90 (unit = 5, file = 'stdin')
Fortran runtime error: Cannot change ACCESS parameter in OPEN statement
And if I just ask the name of the file associated file input_unit with
gfortran i get "stdin", with ifort i get "/proc/28683/fd/0".
3) Ifort is automatically reconnecting input_unit to standard input when file
is omitted, how is that a bug ?