re PR libfortran/18983 (can't open /dev/null as an output file)
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
This commit is contained in:
parent
6a29dc8b1b
commit
e1c74af03a
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
|
9
gcc/testsuite/gfortran.dg/write_to_null.f90
Normal file
9
gcc/testsuite/gfortran.dg/write_to_null.f90
Normal file
@ -0,0 +1,9 @@
|
||||
! { 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
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1557,9 +1557,13 @@ st_write_done (void)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user