summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gfortran.dg/sizeof.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/sizeof.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/sizeof.f9012
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/testsuite/gfortran.dg/sizeof.f90 b/gcc/testsuite/gfortran.dg/sizeof.f90
index 35ea527ed0d..5518ba22491 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
OpenPOWER on IntegriCloud