This is the mail archive of the gcc-patches@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]

Re: [patch, fortran] Separate READ from WRITE


On 10/12/2010 01:58 AM, Tobias Burnus wrote:
On 10/11/2010 08:57 PM, Tobias Burnus wrote:
Thomas Koenig wrote:
Well, feedback seems to have been positive, so here is the formal patch
with a proper changelog entry.

No review yet but:


iocall[IOCALL_X_LOGICAL] = gfc_build_library_function_decl_with_spec (
get_identifier (PREFIX("transfer_logical")), ".wW",
void_type_node, 3, dt_parm_type, pvoid_type_node, gfc_int4_type_node);

+ iocall[IOCALL_X_LOGICAL_WRITE] = gfc_build_library_function_decl_with_spec (
+ get_identifier (PREFIX("transfer_logical_write")), ".rW",
+ void_type_node, 3, dt_parm_type, pvoid_type_node, gfc_int4_type_node);
+

I looked at libgfortran/io/transfer.c and both formatted_transfer_scalar_read and -_write contain a like like: dtp->u.p.sf_read_comma = dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA ? 0 : 1;

I don't know if this is relevant but parameters within the current_unit structure can and do get modified by read and write functions. Bits within the "common" structure get modified at run time by the error and iostat, err, end, eor events, but are not used from one IO call to the next. They are checked by series of calls between st_write/read and st_write_done/read_done to check library status as the various transfers proceed.


I am wondering as part of the ABI cleanup, should we isolate the function arguments so that it is clear which ones get modified and which do not?

Jerry


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