From 0c1729748b36746e3631de5d8cf8de3e3636fdc3 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Wed, 28 Sep 2016 19:43:03 +0000 Subject: [PATCH] re PR fortran/77707 (formatted direct access: nextrec off by one) 2016-09-28 Jerry DeLisle PR libgfortran/77707 * gfortran.dg/inquire_17.f90: New test. From-SVN: r240593 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/inquire_17.f90 | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/inquire_17.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 22a001b1445..f1a8803cda6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-09-28 Jerry DeLisle + + PR libgfortran/77707 + * gfortran.dg/inquire_17.f90: New test. + 2016-09-28 Jakub Jelinek PR c++/77467 diff --git a/gcc/testsuite/gfortran.dg/inquire_17.f90 b/gcc/testsuite/gfortran.dg/inquire_17.f90 new file mode 100644 index 00000000000..8a722f0e733 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/inquire_17.f90 @@ -0,0 +1,10 @@ +! { dg-do run } +! PR77707 formatted direct access: nextrec off by one +program directaccess_formatted + integer nextrec + open(10, status='scratch', form='formatted', access='direct', recl=10*4) + write(10,'(10i4)',rec=9) 1,2,3,4,5,6,7,8,9,10 + inquire(unit=10,nextrec=nextrec) + if (nextrec.ne.10) call abort + close(10) +end -- 2.30.2