diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-12-07 01:15:46 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-12-07 01:15:46 +0000 |
commit | 0717bfbd1778001f3f15370e9d7fdef4f749f88f (patch) | |
tree | cd4af85d5fa1923a0bfbdabd1d9419907051ab68 /gcc | |
parent | f5c64803b9d08a3e94ede19cf16a40ca6702751f (diff) | |
download | gcc-0717bfbd1778001f3f15370e9d7fdef4f749f88f.zip gcc-0717bfbd1778001f3f15370e9d7fdef4f749f88f.tar.gz gcc-0717bfbd1778001f3f15370e9d7fdef4f749f88f.tar.bz2 |
re PR fortran/38425 (I/O: POS= compile-time diagnostics)
2008-12-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/38425
* gfortran.dg/io_constraints_5.f90: New test.
From-SVN: r142535
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/io_constraints_5.f90 | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2e6c2da..d7490b0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-12-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR fortran/38425 + * gfortran.dg/io_constraints_5.f90: New test. + 2008-12-06 Jakub Jelinek <jakub@redhat.com> PR middle-end/38428 diff --git a/gcc/testsuite/gfortran.dg/io_constraints_5.f90 b/gcc/testsuite/gfortran.dg/io_constraints_5.f90 new file mode 100644 index 0000000..8d62e25 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/io_constraints_5.f90 @@ -0,0 +1,23 @@ +! { dg-do compile } +! PR 38425 I/O: POS= compile-time diagnostics +!---------------------------------------------------------- +character(len=30) :: str +open(3,access='stream') + +! C919 (R913) If io-unit is not a file-unit-number, the +! io-control-spec-list shall not contain a REC= specifier +! or a POS= specifier. +write(str,*, pos=4) 5 ! { dg-error "incompatible with internal" } + +! C927 (R913) If a POS= specifier appears, the +! io-control-spec-list shall not contain a REC= specifier. +write(3,pos=5,rec=4) 5 ! { dg-error "POS= is not allowed with REC=" } +write(3,rec=4,pos=5) 5 ! { dg-error "POS= is not allowed with REC=" } + +!Fortran runtime error: REC=specifier not allowed with STREAM access +write(3,rec=4) 5 +!Fortran runtime error: REC=specifier must be positive +write(3,rec=-3) 44 +!Fortran runtime error: POS=specifier must be positive +write(3,pos=-4) 44 +end |