diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-24 00:26:08 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-24 00:26:08 +0000 |
commit | 309622713c879be2a93f2689e89b52343a13176c (patch) | |
tree | 920919f2fb522e3f96c7d6a11c6065421b459234 /gcc/testsuite/gfortran.dg | |
parent | e8419bc50555272d1227e10a94f430382b6a8ad8 (diff) | |
download | gcc-309622713c879be2a93f2689e89b52343a13176c.tar.gz |
2006-07-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/25289
* gfortran.dg/direct_io_6.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115702 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r-- | gcc/testsuite/gfortran.dg/direct_io_6.f90 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/direct_io_6.f90 b/gcc/testsuite/gfortran.dg/direct_io_6.f90 new file mode 100644 index 00000000000..227d3fe4f21 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/direct_io_6.f90 @@ -0,0 +1,27 @@ +!{ dg-do run } +! PR25289 Cannot handle record numbers larger than huge(0_4). +! This test checks that very large record numbers can be used. +! Derived from example in PR. +! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org> + integer(KIND=1) abyte + integer(KIND=8) n + n = huge(0_4) + n = n * 256 + abyte = 105 + open(10,file="foo",recl=2,form='unformatted',access='direct') + write(10,rec=n) abyte + abyte = 0 + read(10,rec=n) abyte + if (abyte.ne.105) call abort() + write(10,rec=1) abyte + abyte = 0 + read(10,rec=1) abyte + if (abyte.ne.105) call abort() + n=n/2 + write(10,rec=n) abyte + abyte = 0 + read(10,rec=n) abyte + if (abyte.ne.105) call abort() + close(10, status="delete") + end +
\ No newline at end of file |