diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2006-07-24 00:26:08 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2006-07-24 00:26:08 +0000 |
commit | 5b8c001af92306368900d132b18f8583699e5819 (patch) | |
tree | 920919f2fb522e3f96c7d6a11c6065421b459234 | |
parent | 68ea48ea13fcfc1041dab61021a42aaebdec7088 (diff) | |
download | gcc-5b8c001af92306368900d132b18f8583699e5819.zip gcc-5b8c001af92306368900d132b18f8583699e5819.tar.gz gcc-5b8c001af92306368900d132b18f8583699e5819.tar.bz2 |
re PR libfortran/25289 (Cannot handle record numbers large than huge(0_4))
2006-07-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/25289
* gfortran.dg/direct_io_6.f90: New test.
From-SVN: r115702
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/direct_io_6.f90 | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8e92c9b..be305c6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-07-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR fortran/25289 + * gfortran.dg/direct_io_6.f90: New test. + 2006-07-24 Jan Hubicka <jh@suse.cz> PR c/25795 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 0000000..227d3fe --- /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 |