OSDN Git Service

2007-05-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 May 2007 01:01:27 +0000 (01:01 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 May 2007 01:01:27 +0000 (01:01 +0000)
PR libfortran/31880
* io/unix.c (fd_alloc_r_at): Fix calculation of physical offset.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124588 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/unix.c

index 18118d8..acfaec5 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/31880
+       * io/unix.c (fd_alloc_r_at): Fix calculation of physical offset.
+
 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR libfortran/31607
index cdac0d7..38d4adf 100644 (file)
@@ -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;
     }