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
This commit is contained in:
parent
412dc870cb
commit
f53d3f9317
4 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-01-16 Bud Davis <bdavis9659@comcast.net>
|
||||
|
||||
PR fortran/18778
|
||||
* gfortran.dg/endfile_2.f90: New test.
|
||||
|
||||
2005-01-16 Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
PR 19168
|
||||
|
|
12
gcc/testsuite/gfortran.dg/endfile_2.f90
Normal file
12
gcc/testsuite/gfortran.dg/endfile_2.f90
Normal file
|
@ -0,0 +1,12 @@
|
|||
! { dg-do run }
|
||||
! pr18778 abort on endfile without opening unit
|
||||
program test
|
||||
implicit none
|
||||
integer i
|
||||
endfile(8)
|
||||
rewind(8)
|
||||
read(8,end=0023)i
|
||||
call abort ! should never get here
|
||||
stop
|
||||
0023 continue
|
||||
end
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue