[patch, libgfortran] Simplification for unformatted read and write and PR 31933

Jerry DeLisle jvdelisle@verizon.net
Fri May 25 16:46:00 GMT 2007


Hi all,

The attached patch simplifies the code and eliminates a function call.  This 
regression tests fine on x86-64.  There is no new test case.

The kind parameter is not used.  The size is provided by the front end already. 
  A further improvement we can make is to have the size provided to 
transfer_real which is the only other place size_from_real_kind() is used in 
transfer.c. (I will work on that later)

Also, note that the error reported in PR31933 is due to memory we allocated that 
we never use, but for kind=10, 16 is the correct size.  So we can close that PR 
by adding a comment in the code.

OK for trunk?

Jerry

2007-05-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/transfer.c (unformatted_read): Use size from front end eliminating
	use of size_from_real_kind. (unformatted_write): Ditto.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: transfer.diff
Type: text/x-patch
Size: 3335 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070525/336ce1d3/attachment.bin>


More information about the Fortran mailing list