From 853c0ad7f0edc57a50c60803ea1aab588bab7561 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Fri, 25 May 2007 17:41:17 +0000 Subject: [PATCH] transfer.c (unformatted_read): Use size from front end eliminating use of size_from_real_kind. 2007-05-25 Jerry DeLisle * io/transfer.c (unformatted_read): Use size from front end eliminating use of size_from_real_kind. (unformatted_write): Ditto. From-SVN: r125064 --- libgfortran/ChangeLog | 5 +++++ libgfortran/io/transfer.c | 27 ++++++++++----------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 7ea870abf09..38774284d24 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2007-05-25 Jerry DeLisle + + * io/transfer.c (unformatted_read): Use size from front end eliminating + use of size_from_real_kind. (unformatted_write): Ditto. + 2007-05-23 Steve Ellcey * Makefile.in: Regenerate. diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 6d23e5e81b9..128b4c1be59 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -695,7 +695,7 @@ write_buf (st_parameter_dt *dtp, void *buf, size_t nbytes) static void unformatted_read (st_parameter_dt *dtp, bt type, - void *dest, int kind, + void *dest, int kind __attribute__((unused)), size_t size, size_t nelems) { size_t i, sz; @@ -723,40 +723,37 @@ unformatted_read (st_parameter_dt *dtp, bt type, /* By now, all complex variables have been split into their constituent reals. */ - if (type == BT_REAL || type == BT_COMPLEX) - sz = size_from_real_kind (kind); - else - sz = kind; - for (i=0; iu.p.current_unit->flags.convert == CONVERT_NATIVE || size == 1 || type == BT_CHARACTER) { size *= nelems; - write_buf (dtp, source, size); } else { char buffer[16]; char *p; - size_t i, sz; + size_t i; /* Break up complex into its constituent reals. */ if (type == BT_COMPLEX) @@ -770,16 +767,12 @@ unformatted_write (st_parameter_dt *dtp, bt type, /* By now, all complex variables have been split into their constituent reals. */ - if (type == BT_REAL || type == BT_COMPLEX) - sz = size_from_real_kind (kind); - else - sz = kind; for (i=0; i