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]
Other format: [Raw text]

[Bug fortran/60596] Inquire size for stream zero


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 ?


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