diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2007-08-04 20:14:26 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2007-08-04 20:14:26 +0000 |
commit | 6b44ad312f943d9ae65ad6db8f4be0640eefec6e (patch) | |
tree | ad0524d9a67b66bd3b48848f50ff5f9d4214e4fc | |
parent | 867140ecff102a03de8736354b3697736901d049 (diff) | |
download | gcc-6b44ad312f943d9ae65ad6db8f4be0640eefec6e.zip gcc-6b44ad312f943d9ae65ad6db8f4be0640eefec6e.tar.gz gcc-6b44ad312f943d9ae65ad6db8f4be0640eefec6e.tar.bz2 |
re PR fortran/32770 ([Meta-bug] -fdefault-integer-8 issues)
2007-08-04 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/32770
* gfortran.dg/streamio_8.f90: Adjust so test case passes
for -fdefault-integer-8 and -fdefault-real-8.
* gfortran.dg/streamio_10.f90: Likewise.
* gfortran.dg/sizeof.f90: Likewise.
From-SVN: r127212
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/sizeof.f90 | 12 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/streamio_10.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/streamio_8.f90 | 8 |
4 files changed, 22 insertions, 8 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 37fce96..d18f3b9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,14 @@ 2007-08-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32770 + * gfortran.dg/streamio_8.f90: Adjust so test case passes + for -fdefault-integer-8 and -fdefault-real-8. + * gfortran.dg/streamio_10.f90: Likewise. + * gfortran.dg/sizeof.f90: Likewise. + +2007-08-04 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/32770 * gfortran.dg/direct_io_2.f90: Implicitly declare integer variables as kind=4 so they don't overflow the record length. diff --git a/gcc/testsuite/gfortran.dg/sizeof.f90 b/gcc/testsuite/gfortran.dg/sizeof.f90 index 35ea527..5518ba2 100644 --- a/gcc/testsuite/gfortran.dg/sizeof.f90 +++ b/gcc/testsuite/gfortran.dg/sizeof.f90 @@ -7,15 +7,21 @@ subroutine check_int (j) logical :: l(6) integer(8) :: jb(5,4) - if (sizeof (j) /= sizeof (i)) call abort if (sizeof (jb) /= 2*sizeof (ib)) call abort + if (sizeof(j) == 4) then + if (sizeof (j) /= sizeof (i)) call abort + else + if (sizeof (j) /= 2 * sizeof (i)) call abort + end if + ipa=>ib(2:3,1) l = (/ sizeof(i) == 4, sizeof(ia) == 20, sizeof(ib) == 80, & sizeof(ip) == 4, sizeof(ipa) == 8, sizeof(ib(1:5:2,3)) == 12 /) if (any(.not.l)) call abort + if (sizeof(l) /= 6*sizeof(l(1))) call abort end subroutine check_int @@ -25,8 +31,8 @@ subroutine check_real (x, y) target :: r pointer :: rp double precision :: d(5,5) - complex :: c(5) - + complex(kind=4) :: c(5) + if (sizeof (y) /= 5*sizeof (x)) call abort if (sizeof (r) /= 8000*4) call abort diff --git a/gcc/testsuite/gfortran.dg/streamio_10.f90 b/gcc/testsuite/gfortran.dg/streamio_10.f90 index e49617e..b0c573e 100644 --- a/gcc/testsuite/gfortran.dg/streamio_10.f90 +++ b/gcc/testsuite/gfortran.dg/streamio_10.f90 @@ -4,7 +4,7 @@ ! Test case derived from that given in PR by Steve Kargl. program stream_io_10 implicit none - integer :: a(4), b(4) + integer(kind=4) :: a(4), b(4) integer(kind=8) :: thepos a = (/ 1, 2, 3, 4 /) b = a diff --git a/gcc/testsuite/gfortran.dg/streamio_8.f90 b/gcc/testsuite/gfortran.dg/streamio_8.f90 index 1e5e16f..420f5b9 100644 --- a/gcc/testsuite/gfortran.dg/streamio_8.f90 +++ b/gcc/testsuite/gfortran.dg/streamio_8.f90 @@ -8,7 +8,7 @@ PROGRAM stream_io_8 real(kind=8) r mypos = 0 mystring = "not yet" - r = 12.25 + r = 12.25d0 OPEN(UNIT=11, ACCESS="stream") inquire(unit=11, pos=mypos) if (mypos.ne.1) call abort() @@ -18,17 +18,17 @@ PROGRAM stream_io_8 WRITE(11) "second" inquire(unit=11, pos=mypos) if (mypos.ne.12) call abort() - WRITE(11) 1234567 + WRITE(11) 1234567_4 inquire(unit=11, pos=mypos) if (mypos.ne.16) call abort() write(11) r r = 0.0 inquire (11, pos=mypos) read(11,pos=16)r - if (r.ne.12.25) call abort() + if (abs(r-12.25d0)>1e-10) call abort() inquire(unit=11, pos=mypos) inquire(unit=11, access=mystring) if (mypos.ne.24) call abort() if (mystring.ne."STREAM") call abort() CLOSE(UNIT=11, status="delete") -END PROGRAM stream_io_8
\ No newline at end of file +END PROGRAM stream_io_8 |