[Bug fortran/50926] New: Output to 'fort.6" file instead of console

2011-10-30 Thread dm.vl.ivanov at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50926

 Bug #: 50926
   Summary: Output to 'fort.6" file instead of console
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dm.vl.iva...@gmail.com


Console output suddenly stops to be console: at some point (usually when
write(*,*) and write(6,*) operators are being used for some times but non only
in that case, see the details below) the "fort.6" file is being created and
fill with the rest of program's output. Seems not a very big deal but it is
quite uncomfortable and eliminates the possibility to make a
console-interactive program. 

I also tried to avoid using "write" and mix my fortran code with C module
(compiled with g++) containing functions for console output. It helps just a
bit: some more strings go to the console and some less - to the "fort.6" file. 

This seems to be exactly the matter of compiler, not anything else: the same
code compiled with ifort runs just fine, no problems noticed. 

I imagine some more details would be good but my code is too big to upload
here. I can just tell some numbers: about 10 times write(*,*) and write(6,*)
functions produce their output to the console, all the rest - to the "fort.6"
file. When I use C functions instead of fortran's "write" this number becomes
slightly more, about 15 strings show up at the console. 

Environment: gcc version 4.6.1 (Debian 4.6.1-15), Debian testing/sid


[Bug fortran/50926] Output to 'fort.6" file instead of console

2011-10-31 Thread dm.vl.ivanov at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50926

Dmitry  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #3 from Dmitry  2011-10-31 16:31:17 
UTC ---
Tobias, thank you very much, you are completely right, the problem was
close(6). Thanks also for your advise to avoid output units 0-9, I won't repeat
this mistake again. 

kargl, thank you for your response, if I happen to encounter a real bug, I'll
provide more information about it.