This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make NEXTREC specifier for INQUIRE work for large record numbers
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 18 Nov 2017 12:43:16 +0200
- Subject: Re: [PATCH] Make NEXTREC specifier for INQUIRE work for large record numbers
- Authentication-results: sourceware.org; auth=none
- References: <1511001250-27383-1-git-send-email-blomqvist.janne@gmail.com>
On Sat, Nov 18, 2017 at 12:34 PM, Janne Blomqvist
<blomqvist.janne@gmail.com> wrote:
> This is accomplished by making the NEXTREC specifier be a 8 byte
> integer where supported.
>
> I wasn't able to come up with a testcase that does not create a large
> file that could be added to the testsuite, but here's one which
> creates a 2 GB file:
>
> program nextrec
> implicit none
> integer(8) :: ii, n
> open(10, file="foo.dat", recl=1, access="direct", form="unformatted", status="replace")
> do ii = 1, huge(1) + 2_8
> write(10, rec=ii) 'a'
> end do
> inquire(10, nextrec=n)
> if (n /= huge(1) + 2_8) then
This statement should of course be
if (n /= huge(1) + 3_8) then
--
Janne Blomqvist