[patch, libgfortran] PR44953 FAIL: gfortran.dg/char4_iunit_1.f03 * execution test
Jerry DeLisle
jvdelisle@verizon.net
Mon Jul 19 04:22:00 GMT 2010
Hi all,
The failures were due to some sloppy pointer use and I missed a few of the
functions in write.c during initial implementation. The attached patch cleans
this all up. New test cases are not needed.
Passed regression testing on IBM Power 5 running Linux and Dominique reports
success with the original test cases. Also regression tested on x86-64-linux-gnu.
OK for trunk?
Regards,
Jerry
PS After this patch is committed, I plan to commit a separate patch to clean up
a bunch of unrelated whitespace issues I have found in transfer.c. I did not
want those fixes to make this patch here more difficult to review.
2010-07-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/44953
* io/unix.c (mem_alloc_w4): Return gfc_char4_t instead of char type
pointer. (mem_write4): Remove cast to gfc_char4_t.
* io/transfer.c (write_block): Use a gfc_char4_t pointer.
(memset4): New helper function. (next_record_w): Use new helper
function rather than sset for internal units. Don't attempt to pad
with spaces if it is not needed.
* io/unix.h: Update prototype for mem_alloc_w4.
* io/write.c (memset4): Use gfc_char4_t pointer and chracter type.
Don't use multiply by 4 to compute offset. (memcpy4): Likewise.
(write_default_char4): Use a gfc_char4_t pointer and update memset4
and memcpy calls. (write_a): Likewise. (write_l): Likewise.
(write_boz): Likewise. (write_decimal): Likewise. (write_x): Likewise.
(write_char): Add support for character(kind=4) internal units that
was previously missed. (write_integer): Use a gfc_char4_t pointer and
update memset4 and memcpy calls. (write_character): Likewise.
(write_separator): Add support for character(kind=4) internal units
that was previously missed.
* write_float.def (output_float): Use a gfc_char4_t pointer and
update memset4 and memcpy calls. (write_infnan): Likewise.
(output_float_FMT_G_): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr44953-d.diff
Type: text/x-patch
Size: 13611 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100719/bf77024b/attachment.bin>
More information about the Gcc-patches
mailing list