aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorBud Davis <bdavis9659@comcast.net>2005-01-16 20:44:01 +0000
committerBud Davis <bdavis@gcc.gnu.org>2005-01-16 20:44:01 +0000
commitf53d3f931757427a50c22c4dc54b0f01e290fcbd (patch)
tree539669e5c3183f55dfd806145ccc55dc8d00b3ba /libgfortran
parent412dc870cb05c1f182f29455c9cda79ea4dac7fa (diff)
downloadgcc-f53d3f931757427a50c22c4dc54b0f01e290fcbd.zip
gcc-f53d3f931757427a50c22c4dc54b0f01e290fcbd.tar.gz
gcc-f53d3f931757427a50c22c4dc54b0f01e290fcbd.tar.bz2
re PR libfortran/18778 (ENDFILE is not functionnal)
2005-01-16 Bud Davis <bdavis9659@comcast.net> PR fortran/18778 * gfortran.dg/endfile_2.f90: New test. * io/transfer.c (us_read): no bytes available is not a runtime error. From-SVN: r93737
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/transfer.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index c0534b8..d6bcb8d 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-16 Bud Davis <bdavis9659@comcast.net>
+
+ PR fortran/18778
+ * io/transfer.c (us_read): no bytes available is not a
+ runtime error.
+
2005-01-15 Bud Davis <bdavis9659@comcast.net>
PR fortran/18983
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 5454407..73ae853 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -843,6 +843,9 @@ us_read (void)
n = sizeof (gfc_offset);
p = salloc_r (current_unit->s, &n);
+ if (n == 0)
+ return; /* end of file */
+
if (p == NULL || n != sizeof (gfc_offset))
{
generate_error (ERROR_BAD_US, NULL);