[PATCH, Fortran] DEC Compatibility: New I/O Specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec

Andreas Schwab schwab@suse.de
Thu Oct 27 11:02:00 GMT 2016


On Okt 25 2016, Fritz Reese <fritzoreese@gmail.com> wrote:

> diff --git a/gcc/testsuite/gfortran.dg/dec_io_6.f90 b/gcc/testsuite/gfortran.dg/dec_io_6.f90
> new file mode 100644
> index 0000000..a0c0256
> --- /dev/null
> +++ b/gcc/testsuite/gfortran.dg/dec_io_6.f90
> @@ -0,0 +1,15 @@
> +! { dg-do run "xfail *-*-*" }
> +! { dg-options "-fdec" }
> +!
> +! Test that we get a run-time error for close-on-delete with READONLY.
> +!
> +
> +implicit none
> +
> +integer :: fd = 8
> +character(*), parameter :: f = "test.txt"
> +
> +open(unit=fd,file=f,action='read',readonly)
> +close(unit=fd,status='delete') ! XFAIL "protected by READONLY"
> +
> +end

At line 12 of file /usr/local/gcc/gcc-20161027/gcc/testsuite/gfortran.dg/dec_io_6.f90 (unit = 8)
Fortran runtime error: Cannot open file 'test.txt': No such file or directory

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



More information about the Gcc-patches mailing list