re PR fortran/67367 (Program crashes on READ(IOSTAT=IOS, ...) on directory OPEN()ed without error)

2015-08-29 Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/67367
	* gfortran.dg/read_dir.f90: New test. May fail on some platforms.

From-SVN: r227321
This commit is contained in:
Jerry DeLisle 2015-08-29 15:52:43 +00:00
parent 7c32549e57
commit 04ffad3532
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2015-08-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/67367
* gfortran.dg/read_dir.f90: New test. May fail on some platforms.
2015-08-29 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/46193

View File

@ -0,0 +1,14 @@
! { dg-do run }
! PR67367
program bug
implicit none
character(len=1) :: c
character(len=256) :: message
integer ios
call system('[ -d junko.dir ] || mkdir junko.dir')
open(unit=10, file='junko.dir',iostat=ios,action='read',access='stream')
if (ios.ne.0) call abort
read(10, iostat=ios) c
if (ios.ne.21) call abort
call system('rmdir junko.dir')
end program bug