2005-01-15 Bud Davis <bdavis9659@comcast.net>
PR fortran/18983
* io/transfer.c (st_write_done): only truncate when it
is required.
2005-01-15 Bud Davis <bdavis9659@comcast.net>
PR fortran/18983
* gfortran.dg/write_to_null.f90: New test.
From-SVN: r93689
+2005-01-15 Bud Davis <bdavis9659@comcast.net>
+
+ PR fortran/18983
+ * gfortran.dg/write_to_null.f90: New test.
+
2005-01-14 Andrew Pinski <pinskia@physics.uc.edu>
John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
--- /dev/null
+! { dg-do run }
+! pr18983
+! could not write to /dev/null
+ integer i
+ open(10,file="/dev/null")
+ do i = 1,100
+ write(10,*) "Hello, world"
+ end do
+ end
+2005-01-15 Bud Davis <bdavis9659@comcast.net>
+
+ PR fortran/18983
+ * io/transfer.c (st_write_done): only truncate when it
+ is required.
+
2005-01-12 Toon Moene <toon@moene.indiv.nluug.nl>
PR libfortran/19280
current_unit->endfile = AT_ENDFILE; /* Just at it now. */
break;
- case NO_ENDFILE: /* Get rid of whatever is after this record. */
- if (struncate (current_unit->s) == FAILURE)
- generate_error (ERROR_OS, NULL);
+ case NO_ENDFILE:
+ if (current_unit->current_record > current_unit->last_record)
+ {
+ /* Get rid of whatever is after this record. */
+ if (struncate (current_unit->s) == FAILURE)
+ generate_error (ERROR_OS, NULL);
+ }
current_unit->endfile = AT_ENDFILE;
break;