From: Tobias Burnus Date: Tue, 15 May 2007 10:16:46 +0000 (+0200) Subject: re PR libfortran/31915 (Failure with unf_io_convert_3.f90) X-Git-Tag: releases/gcc-4.3.0~5090 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80bcbc80442d6de0cfacd2aad5b1548b89a7758a;p=thirdparty%2Fgcc.git re PR libfortran/31915 (Failure with unf_io_convert_3.f90) 2007-05-15 Tobias Burnus PR libfortran/31915 * io/transfer.c (unformatted_read): Use proper size for real(10). (unformatted_write): Ditto. From-SVN: r124741 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index a90c7160cd16..dec751f9c851 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2007-05-15 Tobias Burnus + + PR libfortran/31915 + * io/transfer.c (unformatted_read): Use proper size for real(10). + (unformatted_write): Ditto. + 2007-05-14 Francois-Xavier Coudert PR fortran/30723 diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 9735aae7cce5..6d23e5e81b99 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -721,12 +721,13 @@ unformatted_read (st_parameter_dt *dtp, bt type, p = dest; /* By now, all complex variables have been split into their - constituent reals. For types with padding, we only need to - read kind bytes. We don't care about the contents - of the padding. If we hit a short record, then sz is - adjusted accordingly, making later reads no-ops. */ + constituent reals. */ - sz = kind; + if (type == BT_REAL || type == BT_COMPLEX) + sz = size_from_real_kind (kind); + else + sz = kind; + for (i=0; i