From: Jerry DeLisle Date: Thu, 10 May 2007 01:01:27 +0000 (+0000) Subject: re PR libfortran/31880 ([4.2 only] silent data corruption in gfortran read statement) X-Git-Tag: releases/gcc-4.3.0~5154 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5f9d0802ccf6c6431f93ac21433e4d97f72c9e6;p=thirdparty%2Fgcc.git re PR libfortran/31880 ([4.2 only] silent data corruption in gfortran read statement) 2007-05-09 Jerry DeLisle PR libfortran/31880 * io/unix.c (fd_alloc_r_at): Fix calculation of physical offset. From-SVN: r124588 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 18118d887995..acfaec5e22fe 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2007-05-09 Jerry DeLisle + + PR libfortran/31880 + * io/unix.c (fd_alloc_r_at): Fix calculation of physical offset. + 2007-05-07 Francois-Xavier Coudert PR libfortran/31607 diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index cdac0d7dfdd6..38d4adfef635 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -492,7 +492,7 @@ fd_alloc_r_at (unix_stream * s, int *len, gfc_offset where) if (n < 0) return NULL; - s->physical_offset = where + n; + s->physical_offset = m + n; s->active += n; } else @@ -503,7 +503,7 @@ fd_alloc_r_at (unix_stream * s, int *len, gfc_offset where) if (do_read (s, s->buffer + s->active, &n) != 0) return NULL; - s->physical_offset = where + n; + s->physical_offset = m + n; s->active += n; }