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


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 think one also needs to update the "fn spec" for "transfer_logical" besides adding "transfer_logical_write". I am also a bit lost whether ".rW" is correct - I always get confused which argument is for what and whether some status is also updated in dtp or whether it only contains the internal-I/O string and the format string. I had expected that the fn-spec should be ".wR" for WRITE, i.e. that the dtp might be written to (for internal I/O) but that the second argument is only read from (R). While for READ, I would expect the ".rW" which your patch has for transfer_logical_write (assuming that no status is returned via dtp during a transfer call).


Tobias


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