On Mon, Apr 06, 2009 at 03:52:19PM -0700, H.J. Lu wrote:
STDOUT_FILENO, STDERR_FILENO and STDIN_FILENO are handled by C library.
libgfortran shouldn't close them for C library. Before revision 145571,
fd_close handled them correctly. OK for trunk?
By default, stdin is attached to unit 5 and stdout
is attached to unit 6. Does the following work
with your patch?
program test
close(6)
call sub
end program test
!
! Write 'help' to unit=6, which should create file 'fort.6'
!
subroutine sub
write(6) 'help'
end subroutine sub