This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40008] F2008: Add NEWUNIT= for OPEN statement
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jun 2009 19:01:03 -0000
- Subject: [Bug fortran/40008] F2008: Add NEWUNIT= for OPEN statement
- References: <bug-40008-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2009-06-07 19:01 -------
Subject: Bug 40008
Author: jvdelisle
Date: Sun Jun 7 19:00:47 2009
New Revision: 148253
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148253
Log:
2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40008
* libgfortran.h: Define IOPARM_OPEN_HAS_NEWUNIT.
* io/open.c (st_open): Don't error on negative unit number if NEWUNIT
was specified. If NEWUNIT is specified, call new function to get the
unique unit number and assign it.
* io/io.h (st_parameter_open): Add pointer to newunit. Add prototype
for
next_available_newunit. Add prototype for new function,
get_unique_unit_number.
* io/unit.c: Declare next_available_newunit. Define the first newunit
number. (init_units): Initialize next_available_unit.
(get_unique_unit_number): New function. Fix whitespace and comments.
* io/transfer.c (data_transfer_init): Update error message to not be
specific to OPEN statements.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/io.h
trunk/libgfortran/io/open.c
trunk/libgfortran/io/transfer.c
trunk/libgfortran/io/unit.c
trunk/libgfortran/libgfortran.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40008