From 04ffad35321aaebeff3ffa8764d26454d93db59e Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Sat, 29 Aug 2015 15:52:43 +0000 Subject: [PATCH] re PR fortran/67367 (Program crashes on READ(IOSTAT=IOS, ...) on directory OPEN()ed without error) 2015-08-29 Jerry DeLisle PR fortran/67367 * gfortran.dg/read_dir.f90: New test. May fail on some platforms. From-SVN: r227321 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/read_dir.f90 | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/read_dir.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 08e40831238..1d8373d7876 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-08-29 Jerry DeLisle + + PR fortran/67367 + * gfortran.dg/read_dir.f90: New test. May fail on some platforms. + 2015-08-29 Tom de Vries PR tree-optimization/46193 diff --git a/gcc/testsuite/gfortran.dg/read_dir.f90 b/gcc/testsuite/gfortran.dg/read_dir.f90 new file mode 100644 index 00000000000..f19740c56bc --- /dev/null +++ b/gcc/testsuite/gfortran.dg/read_dir.f90 @@ -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 -- 2.30.2