re PR libfortran/34670 (bounds checking for array intrinsics)
2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
This commit is contained in:
parent
15af420d4e
commit
fd6590f8c8
181 changed files with 10039 additions and 1368 deletions
|
@ -1,3 +1,16 @@
|
|||
2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR libfortran/34670
|
||||
* all_bounds_1.f90: New test case.
|
||||
* maxloc_bounds_1.f90: New test case.
|
||||
* maxloc_bounds_2.f90: New test case.
|
||||
* maxloc_bounds_3.f90: New test case.
|
||||
* maxloc_bounds_4.f90: New test case.
|
||||
* maxloc_bounds_5.f90: New test case.
|
||||
* maxloc_bounds_6.f90: New test case.
|
||||
* maxloc_bounds_7.f90: New test case.
|
||||
* maxloc_bounds_8.f90: New test case.
|
||||
|
||||
2008-01-11 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc.dg/struct-ret-3.c: New test.
|
||||
|
|
17
gcc/testsuite/gfortran.dg/all_bounds_1.f90
Normal file
17
gcc/testsuite/gfortran.dg/all_bounds_1.f90
Normal file
|
@ -0,0 +1,17 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-fbounds-check" }
|
||||
! { dg-shouldfail "Incorrect extent in return value of ALL intrinsic" }
|
||||
program main
|
||||
logical(kind=4), allocatable :: f(:,:)
|
||||
logical(kind=4) :: res(3)
|
||||
character(len=80) line
|
||||
allocate (f(2,2))
|
||||
f = .false.
|
||||
f(1,1) = .true.
|
||||
f(2,1) = .true.
|
||||
res = all(f,dim=1)
|
||||
write(line,fmt='(80L1)') res
|
||||
end program main
|
||||
! { dg-output "Fortran runtime error: Incorrect extent in return value of ALL intrinsic in dimension 1: is 3, should be 2" }
|
||||
|
||||
|
14
gcc/testsuite/gfortran.dg/maxloc_bounds_1.f90
Normal file
14
gcc/testsuite/gfortran.dg/maxloc_bounds_1.f90
Normal file
|
@ -0,0 +1,14 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-fbounds-check" }
|
||||
! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrinsic in dimension 1: is 3, should be 2" }
|
||||
program main
|
||||
integer(kind=4), allocatable :: f(:,:)
|
||||
integer(kind=4) :: res(3)
|
||||
character(len=80) line
|
||||
allocate (f(2,2))
|
||||
f = 3
|
||||
res = maxloc(f,dim=1)
|
||||
write(line,fmt='(80I1)') res
|
||||
end program main
|
||||
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic in dimension 1: is 3, should be 2" }
|
||||
|
16
gcc/testsuite/gfortran.dg/maxloc_bounds_2.f90
Normal file
16
gcc/testsuite/gfortran.dg/maxloc_bounds_2.f90
Normal file
|
@ -0,0 +1,16 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-fbounds-check" }
|
||||
! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrinsic in dimension 1: is 3, should be 2" }
|
||||
program main
|
||||
integer(kind=4), allocatable :: f(:,:)
|
||||
logical, allocatable :: m(:,:)
|
||||
integer(kind=4) :: res(3)
|
||||
character(len=80) line
|
||||
allocate (f(2,2),m(2,2))
|
||||
f = 3
|
||||
m = .true.
|
||||
res = maxloc(f,dim=1,mask=m)
|
||||
write(line,fmt='(80I1)') res
|
||||
end program main
|
||||
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic in dimension 1: is 3, should be 2" }
|
||||
|
16
gcc/testsuite/gfortran.dg/maxloc_bounds_3.f90
Normal file
16
gcc/testsuite/gfortran.dg/maxloc_bounds_3.f90
Normal file
|
@ -0,0 +1,16 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-fbounds-check" }
|
||||
! { dg-shouldfail "Incorrect extent in MASK argument of MAXLOC intrinsic in dimension 2: is 3, should be 2" }
|
||||
program main
|
||||
integer(kind=4), allocatable :: f(:,:)
|
||||
logical, allocatable :: m(:,:)
|
||||
integer(kind=4) :: res(2)
|
||||
character(len=80) line
|
||||
allocate (f(2,2),m(2,3))
|
||||
f = 3
|
||||
m = .true.
|
||||
res = maxloc(f,dim=1,mask=m)
|
||||
write(line,fmt='(80I1)') res
|
||||
end program main
|
||||
! { dg-output "Fortran runtime error: Incorrect extent in MASK argument of MAXLOC intrinsic in dimension 2: is 3, should be 2" }
|
||||
|
23
gcc/testsuite/gfortran.dg/maxloc_bounds_4.f90
Normal file
23
gcc/testsuite/gfortran.dg/maxloc_bounds_4.f90
Normal file
|
@ -0,0 +1,23 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-fbounds-check" }
|
||||
! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrnisic: is 3, should be 2" }
|
||||
module tst
|
||||
contains
|
||||
subroutine foo(res)
|
||||
integer(kind=4), allocatable :: f(:,:)
|
||||
integer, dimension(:) :: res
|
||||
allocate (f(2,5))
|
||||
f = 3
|
||||
res = maxloc(f)
|
||||
end subroutine foo
|
||||
|
||||
end module tst
|
||||
program main
|
||||
use tst
|
||||
implicit none
|
||||
integer(kind=4) :: res(3)
|
||||
call foo(res)
|
||||
end program main
|
||||
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrnisic: is 3, should be 2" }
|
||||
! { dg-final { cleanup-modules "tst" } }
|
||||
|
22
gcc/testsuite/gfortran.dg/maxloc_bounds_5.f90
Normal file
22
gcc/testsuite/gfortran.dg/maxloc_bounds_5.f90
Normal file
|
@ -0,0 +1,22 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-fbounds-check" }
|
||||
! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrnisic: is 3, should be 2" }
|
||||
module tst
|
||||
contains
|
||||
subroutine foo(res)
|
||||
integer(kind=4), allocatable :: f(:,:)
|
||||
integer, dimension(:) :: res
|
||||
allocate (f(2,5))
|
||||
f = 3
|
||||
res = maxloc(f,mask=f>2)
|
||||
end subroutine foo
|
||||
|
||||
end module tst
|
||||
program main
|
||||
use tst
|
||||
implicit none
|
||||
integer(kind=4) :: res(3)
|
||||
call foo(res)
|
||||
end program main
|
||||
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrnisic: is 3, should be 2" }
|
||||
! { dg-final { cleanup-modules "tst" } }
|
16
gcc/testsuite/gfortran.dg/maxloc_bounds_6.f90
Normal file
16
gcc/testsuite/gfortran.dg/maxloc_bounds_6.f90
Normal file
|
@ -0,0 +1,16 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-fbounds-check" }
|
||||
! { dg-shouldfail "Incorrect extent in MASK argument of MAXLOC intrinsic in dimension 2: is 3, should be 2" }
|
||||
program main
|
||||
integer(kind=4), allocatable :: f(:,:)
|
||||
logical, allocatable :: m(:,:)
|
||||
integer(kind=4) :: res(2)
|
||||
character(len=80) line
|
||||
allocate (f(2,2),m(2,3))
|
||||
f = 3
|
||||
m = .true.
|
||||
res = maxloc(f,mask=m)
|
||||
write(line,fmt='(80I1)') res
|
||||
end program main
|
||||
! { dg-output "Fortran runtime error: Incorrect extent in MASK argument of MAXLOC intrinsic in dimension 2: is 3, should be 2" }
|
||||
! { dg-final { cleanup-modules "tst" } }
|
22
gcc/testsuite/gfortran.dg/maxloc_bounds_7.f90
Normal file
22
gcc/testsuite/gfortran.dg/maxloc_bounds_7.f90
Normal file
|
@ -0,0 +1,22 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-fbounds-check" }
|
||||
! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrnisic: is 3, should be 2" }
|
||||
module tst
|
||||
contains
|
||||
subroutine foo(res)
|
||||
integer(kind=4), allocatable :: f(:,:)
|
||||
integer, dimension(:) :: res
|
||||
allocate (f(2,5))
|
||||
f = 3
|
||||
res = maxloc(f,mask=.true.)
|
||||
end subroutine foo
|
||||
|
||||
end module tst
|
||||
program main
|
||||
use tst
|
||||
implicit none
|
||||
integer(kind=4) :: res(3)
|
||||
call foo(res)
|
||||
end program main
|
||||
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrnisic: is 3, should be 2" }
|
||||
! { dg-final { cleanup-modules "tst" } }
|
16
gcc/testsuite/gfortran.dg/maxloc_bounds_8.f90
Normal file
16
gcc/testsuite/gfortran.dg/maxloc_bounds_8.f90
Normal file
|
@ -0,0 +1,16 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-fbounds-check" }
|
||||
! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrinsic in dimension 1: is 3, should be 2" }
|
||||
program main
|
||||
integer(kind=4), allocatable :: f(:,:)
|
||||
logical, allocatable :: m(:,:)
|
||||
integer(kind=4) :: res(3)
|
||||
character(len=80) line
|
||||
allocate (f(2,2),m(2,2))
|
||||
f = 3
|
||||
m = .true.
|
||||
res = maxloc(f,dim=1,mask=.true.)
|
||||
write(line,fmt='(80I1)') res
|
||||
end program main
|
||||
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic in dimension 1: is 3, should be 2" }
|
||||
|
|
@ -1,3 +1,186 @@
|
|||
2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR libfortran/34670
|
||||
* m4/iparm.m4 (upcase): New macro (copied from the m4 manual).
|
||||
(u_name): New macro for the upper case name of the intrinsic.
|
||||
* m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add
|
||||
bounds checking and rank check, depending on
|
||||
compile_options.bounds_check.
|
||||
(`m'name`'rtype_qual`_'atype_code): Likewise.
|
||||
(`s'name`'rtype_qual`_'atype_code): Likewise.
|
||||
* m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add
|
||||
bounds checking and rank check, depending on
|
||||
compile_options.bounds_check.
|
||||
(`m'name`'rtype_qual`_'atype_code): Likewise.
|
||||
(`s'name`'rtype_qual`_'atype_code): Likewise.
|
||||
* generated/all_l16.c: Regenerated.
|
||||
* generated/all_l4.c: Regenerated.
|
||||
* generated/all_l8.c: Regenerated.
|
||||
* generated/any_l16.c: Regenerated.
|
||||
* generated/any_l4.c: Regenerated.
|
||||
* generated/any_l8.c: Regenerated.
|
||||
* generated/count_16_l16.c: Regenerated.
|
||||
* generated/count_16_l4.c: Regenerated.
|
||||
* generated/count_16_l8.c: Regenerated.
|
||||
* generated/count_4_l16.c: Regenerated.
|
||||
* generated/count_4_l4.c: Regenerated.
|
||||
* generated/count_4_l8.c: Regenerated.
|
||||
* generated/count_8_l16.c: Regenerated.
|
||||
* generated/count_8_l4.c: Regenerated.
|
||||
* generated/count_8_l8.c: Regenerated.
|
||||
* generated/maxloc0_16_i1.c: Regenerated.
|
||||
* generated/maxloc0_16_i16.c: Regenerated.
|
||||
* generated/maxloc0_16_i2.c: Regenerated.
|
||||
* generated/maxloc0_16_i4.c: Regenerated.
|
||||
* generated/maxloc0_16_i8.c: Regenerated.
|
||||
* generated/maxloc0_16_r10.c: Regenerated.
|
||||
* generated/maxloc0_16_r16.c: Regenerated.
|
||||
* generated/maxloc0_16_r4.c: Regenerated.
|
||||
* generated/maxloc0_16_r8.c: Regenerated.
|
||||
* generated/maxloc0_4_i1.c: Regenerated.
|
||||
* generated/maxloc0_4_i16.c: Regenerated.
|
||||
* generated/maxloc0_4_i2.c: Regenerated.
|
||||
* generated/maxloc0_4_i4.c: Regenerated.
|
||||
* generated/maxloc0_4_i8.c: Regenerated.
|
||||
* generated/maxloc0_4_r10.c: Regenerated.
|
||||
* generated/maxloc0_4_r16.c: Regenerated.
|
||||
* generated/maxloc0_4_r4.c: Regenerated.
|
||||
* generated/maxloc0_4_r8.c: Regenerated.
|
||||
* generated/maxloc0_8_i1.c: Regenerated.
|
||||
* generated/maxloc0_8_i16.c: Regenerated.
|
||||
* generated/maxloc0_8_i2.c: Regenerated.
|
||||
* generated/maxloc0_8_i4.c: Regenerated.
|
||||
* generated/maxloc0_8_i8.c: Regenerated.
|
||||
* generated/maxloc0_8_r10.c: Regenerated.
|
||||
* generated/maxloc0_8_r16.c: Regenerated.
|
||||
* generated/maxloc0_8_r4.c: Regenerated.
|
||||
* generated/maxloc0_8_r8.c: Regenerated.
|
||||
* generated/maxloc1_16_i1.c: Regenerated.
|
||||
* generated/maxloc1_16_i16.c: Regenerated.
|
||||
* generated/maxloc1_16_i2.c: Regenerated.
|
||||
* generated/maxloc1_16_i4.c: Regenerated.
|
||||
* generated/maxloc1_16_i8.c: Regenerated.
|
||||
* generated/maxloc1_16_r10.c: Regenerated.
|
||||
* generated/maxloc1_16_r16.c: Regenerated.
|
||||
* generated/maxloc1_16_r4.c: Regenerated.
|
||||
* generated/maxloc1_16_r8.c: Regenerated.
|
||||
* generated/maxloc1_4_i1.c: Regenerated.
|
||||
* generated/maxloc1_4_i16.c: Regenerated.
|
||||
* generated/maxloc1_4_i2.c: Regenerated.
|
||||
* generated/maxloc1_4_i4.c: Regenerated.
|
||||
* generated/maxloc1_4_i8.c: Regenerated.
|
||||
* generated/maxloc1_4_r10.c: Regenerated.
|
||||
* generated/maxloc1_4_r16.c: Regenerated.
|
||||
* generated/maxloc1_4_r4.c: Regenerated.
|
||||
* generated/maxloc1_4_r8.c: Regenerated.
|
||||
* generated/maxloc1_8_i1.c: Regenerated.
|
||||
* generated/maxloc1_8_i16.c: Regenerated.
|
||||
* generated/maxloc1_8_i2.c: Regenerated.
|
||||
* generated/maxloc1_8_i4.c: Regenerated.
|
||||
* generated/maxloc1_8_i8.c: Regenerated.
|
||||
* generated/maxloc1_8_r10.c: Regenerated.
|
||||
* generated/maxloc1_8_r16.c: Regenerated.
|
||||
* generated/maxloc1_8_r4.c: Regenerated.
|
||||
* generated/maxloc1_8_r8.c: Regenerated.
|
||||
* generated/maxval_i1.c: Regenerated.
|
||||
* generated/maxval_i16.c: Regenerated.
|
||||
* generated/maxval_i2.c: Regenerated.
|
||||
* generated/maxval_i4.c: Regenerated.
|
||||
* generated/maxval_i8.c: Regenerated.
|
||||
* generated/maxval_r10.c: Regenerated.
|
||||
* generated/maxval_r16.c: Regenerated.
|
||||
* generated/maxval_r4.c: Regenerated.
|
||||
* generated/maxval_r8.c: Regenerated.
|
||||
* generated/minloc0_16_i1.c: Regenerated.
|
||||
* generated/minloc0_16_i16.c: Regenerated.
|
||||
* generated/minloc0_16_i2.c: Regenerated.
|
||||
* generated/minloc0_16_i4.c: Regenerated.
|
||||
* generated/minloc0_16_i8.c: Regenerated.
|
||||
* generated/minloc0_16_r10.c: Regenerated.
|
||||
* generated/minloc0_16_r16.c: Regenerated.
|
||||
* generated/minloc0_16_r4.c: Regenerated.
|
||||
* generated/minloc0_16_r8.c: Regenerated.
|
||||
* generated/minloc0_4_i1.c: Regenerated.
|
||||
* generated/minloc0_4_i16.c: Regenerated.
|
||||
* generated/minloc0_4_i2.c: Regenerated.
|
||||
* generated/minloc0_4_i4.c: Regenerated.
|
||||
* generated/minloc0_4_i8.c: Regenerated.
|
||||
* generated/minloc0_4_r10.c: Regenerated.
|
||||
* generated/minloc0_4_r16.c: Regenerated.
|
||||
* generated/minloc0_4_r4.c: Regenerated.
|
||||
* generated/minloc0_4_r8.c: Regenerated.
|
||||
* generated/minloc0_8_i1.c: Regenerated.
|
||||
* generated/minloc0_8_i16.c: Regenerated.
|
||||
* generated/minloc0_8_i2.c: Regenerated.
|
||||
* generated/minloc0_8_i4.c: Regenerated.
|
||||
* generated/minloc0_8_i8.c: Regenerated.
|
||||
* generated/minloc0_8_r10.c: Regenerated.
|
||||
* generated/minloc0_8_r16.c: Regenerated.
|
||||
* generated/minloc0_8_r4.c: Regenerated.
|
||||
* generated/minloc0_8_r8.c: Regenerated.
|
||||
* generated/minloc1_16_i1.c: Regenerated.
|
||||
* generated/minloc1_16_i16.c: Regenerated.
|
||||
* generated/minloc1_16_i2.c: Regenerated.
|
||||
* generated/minloc1_16_i4.c: Regenerated.
|
||||
* generated/minloc1_16_i8.c: Regenerated.
|
||||
* generated/minloc1_16_r10.c: Regenerated.
|
||||
* generated/minloc1_16_r16.c: Regenerated.
|
||||
* generated/minloc1_16_r4.c: Regenerated.
|
||||
* generated/minloc1_16_r8.c: Regenerated.
|
||||
* generated/minloc1_4_i1.c: Regenerated.
|
||||
* generated/minloc1_4_i16.c: Regenerated.
|
||||
* generated/minloc1_4_i2.c: Regenerated.
|
||||
* generated/minloc1_4_i4.c: Regenerated.
|
||||
* generated/minloc1_4_i8.c: Regenerated.
|
||||
* generated/minloc1_4_r10.c: Regenerated.
|
||||
* generated/minloc1_4_r16.c: Regenerated.
|
||||
* generated/minloc1_4_r4.c: Regenerated.
|
||||
* generated/minloc1_4_r8.c: Regenerated.
|
||||
* generated/minloc1_8_i1.c: Regenerated.
|
||||
* generated/minloc1_8_i16.c: Regenerated.
|
||||
* generated/minloc1_8_i2.c: Regenerated.
|
||||
* generated/minloc1_8_i4.c: Regenerated.
|
||||
* generated/minloc1_8_i8.c: Regenerated.
|
||||
* generated/minloc1_8_r10.c: Regenerated.
|
||||
* generated/minloc1_8_r16.c: Regenerated.
|
||||
* generated/minloc1_8_r4.c: Regenerated.
|
||||
* generated/minloc1_8_r8.c: Regenerated.
|
||||
* generated/minval_i1.c: Regenerated.
|
||||
* generated/minval_i16.c: Regenerated.
|
||||
* generated/minval_i2.c: Regenerated.
|
||||
* generated/minval_i4.c: Regenerated.
|
||||
* generated/minval_i8.c: Regenerated.
|
||||
* generated/minval_r10.c: Regenerated.
|
||||
* generated/minval_r16.c: Regenerated.
|
||||
* generated/minval_r4.c: Regenerated.
|
||||
* generated/minval_r8.c: Regenerated.
|
||||
* generated/product_c10.c: Regenerated.
|
||||
* generated/product_c16.c: Regenerated.
|
||||
* generated/product_c4.c: Regenerated.
|
||||
* generated/product_c8.c: Regenerated.
|
||||
* generated/product_i1.c: Regenerated.
|
||||
* generated/product_i16.c: Regenerated.
|
||||
* generated/product_i2.c: Regenerated.
|
||||
* generated/product_i4.c: Regenerated.
|
||||
* generated/product_i8.c: Regenerated.
|
||||
* generated/product_r10.c: Regenerated.
|
||||
* generated/product_r16.c: Regenerated.
|
||||
* generated/product_r4.c: Regenerated.
|
||||
* generated/product_r8.c: Regenerated.
|
||||
* generated/sum_c10.c: Regenerated.
|
||||
* generated/sum_c16.c: Regenerated.
|
||||
* generated/sum_c4.c: Regenerated.
|
||||
* generated/sum_c8.c: Regenerated.
|
||||
* generated/sum_i1.c: Regenerated.
|
||||
* generated/sum_i16.c: Regenerated.
|
||||
* generated/sum_i2.c: Regenerated.
|
||||
* generated/sum_i4.c: Regenerated.
|
||||
* generated/sum_i8.c: Regenerated.
|
||||
* generated/sum_r10.c: Regenerated.
|
||||
* generated/sum_r16.c: Regenerated.
|
||||
* generated/sum_r4.c: Regenerated.
|
||||
* generated/sum_r8.c: Regenerated.
|
||||
|
||||
2008-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libfortran/34676
|
||||
|
|
|
@ -115,7 +115,25 @@ all_l16 (gfc_array_l16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" ALL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" ALL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ all_l4 (gfc_array_l4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" ALL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" ALL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ all_l8 (gfc_array_l8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" ALL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" ALL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ any_l16 (gfc_array_l16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" ANY intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" ANY intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ any_l4 (gfc_array_l4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" ANY intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" ANY intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ any_l8 (gfc_array_l8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" ANY intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" ANY intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ count_16_l16 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" COUNT intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" COUNT intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ count_16_l4 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" COUNT intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" COUNT intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ count_16_l8 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" COUNT intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" COUNT intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ count_4_l16 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" COUNT intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" COUNT intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ count_4_l4 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" COUNT intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" COUNT intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ count_4_l8 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" COUNT intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" COUNT intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ count_8_l16 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" COUNT intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" COUNT intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ count_8_l4 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" COUNT intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" COUNT intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -115,7 +115,25 @@ count_8_l8 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" COUNT intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" COUNT intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_16_i1 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_16_i1 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_16_i1 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_16_i16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_16_i16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_16_i16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_16_i2 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_16_i2 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_16_i2 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_16_i4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_16_i4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_16_i4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_16_i8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_16_i8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_16_i8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_16_r10 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_16_r10 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_16_r10 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_16_r16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_16_r16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_16_r16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_16_r4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_16_r4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_16_r4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_16_r8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_16_r8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_16_r8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_4_i16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_4_i16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_4_i16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_4_i2 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_4_i2 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_4_i2 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_4_i8 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_4_i8 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_4_i8 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_4_r10 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_4_r10 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_4_r10 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_4_r16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_4_r16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_4_r16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_4_r4 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_4_r4 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_4_r4 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_4_r8 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_4_r8 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_4_r8 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_8_i1 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_8_i1 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_8_i1 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_8_i16 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_8_i16 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_8_i16 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_8_i2 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_8_i2 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_8_i2 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_8_i4 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_8_i4 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_8_i4 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_8_r10 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_8_r10 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_8_r10 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_8_r16 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_8_r16 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_8_r16 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_8_r4 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_8_r4 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_8_r4 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ maxloc0_8_r8 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mmaxloc0_8_r8 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MAXLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ smaxloc0_8_r8 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_16_i1 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_16_i1 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_16_i2 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_16_i2 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_4_i1 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_4_i1 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_4_i2 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_4_i2 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_8_i1 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_8_i1 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_8_i2 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_8_i2 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -116,7 +116,25 @@ maxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXLOC intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -293,7 +311,35 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXLOC intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -406,13 +452,21 @@ smaxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -115,7 +115,25 @@ maxval_i1 (gfc_array_i1 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXVAL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -287,7 +305,35 @@ mmaxval_i1 (gfc_array_i1 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXVAL intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -395,13 +441,21 @@ smaxval_i1 (gfc_array_i1 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXVAL intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -115,7 +115,25 @@ maxval_i16 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXVAL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -287,7 +305,35 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXVAL intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -395,13 +441,21 @@ smaxval_i16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXVAL intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -115,7 +115,25 @@ maxval_i2 (gfc_array_i2 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXVAL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -287,7 +305,35 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXVAL intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -395,13 +441,21 @@ smaxval_i2 (gfc_array_i2 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXVAL intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -115,7 +115,25 @@ maxval_i4 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXVAL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -287,7 +305,35 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXVAL intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -395,13 +441,21 @@ smaxval_i4 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXVAL intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -115,7 +115,25 @@ maxval_i8 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXVAL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -287,7 +305,35 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXVAL intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -395,13 +441,21 @@ smaxval_i8 (gfc_array_i8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXVAL intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -115,7 +115,25 @@ maxval_r10 (gfc_array_r10 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXVAL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -287,7 +305,35 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXVAL intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -395,13 +441,21 @@ smaxval_r10 (gfc_array_r10 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXVAL intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -115,7 +115,25 @@ maxval_r16 (gfc_array_r16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXVAL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -287,7 +305,35 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXVAL intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -395,13 +441,21 @@ smaxval_r16 (gfc_array_r16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXVAL intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -115,7 +115,25 @@ maxval_r4 (gfc_array_r4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXVAL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -287,7 +305,35 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXVAL intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -395,13 +441,21 @@ smaxval_r4 (gfc_array_r4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXVAL intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -115,7 +115,25 @@ maxval_r8 (gfc_array_r8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in"
|
||||
" MAXVAL intrinsic: is %d, should be %d",
|
||||
GFC_DESCRIPTOR_RANK (retarray), rank);
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -287,7 +305,35 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray,
|
|||
else
|
||||
{
|
||||
if (rank != GFC_DESCRIPTOR_RANK (retarray))
|
||||
runtime_error ("rank of return array incorrect");
|
||||
runtime_error ("rank of return array incorrect in MAXVAL intrinsic");
|
||||
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
for (n=0; n < rank; n++)
|
||||
{
|
||||
index_type ret_extent;
|
||||
|
||||
ret_extent = retarray->dim[n].ubound + 1
|
||||
- retarray->dim[n].lbound;
|
||||
if (extent[n] != ret_extent)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) ret_extent, (long int) extent[n]);
|
||||
}
|
||||
for (n=0; n<= rank; n++)
|
||||
{
|
||||
index_type mask_extent, array_extent;
|
||||
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MAXVAL intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < rank; n++)
|
||||
|
@ -395,13 +441,21 @@ smaxval_r8 (gfc_array_r8 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MAXVAL intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
dest = retarray->data;
|
||||
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_16_i1 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_16_i1 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_16_i1 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_16_i16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_16_i16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_16_i16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_16_i2 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_16_i2 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_16_i2 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_16_i4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_16_i4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_16_i4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_16_i8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_16_i8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_16_i8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_16_r10 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_16_r10 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_16_r10 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_16_r16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_16_r4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_16_r4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_16_r4 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_16_r8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_16_r8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_16_r8 (gfc_array_i16 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_4_i1 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_4_i1 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_4_i1 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
|
@ -69,11 +69,22 @@ minloc0_4_i16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
@ -182,11 +193,40 @@ mminloc0_4_i16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank, mask_rank;
|
||||
index_type ret_extent;
|
||||
int n;
|
||||
index_type array_extent, mask_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("Incorrect extent in return value of"
|
||||
" MINLOC intrnisic: is %ld, should be %d",
|
||||
(long int) ret_extent, rank);
|
||||
|
||||
mask_rank = GFC_DESCRIPTOR_RANK (mask);
|
||||
if (rank != mask_rank)
|
||||
runtime_error ("rank of MASK argument in MINLOC intrnisic"
|
||||
"should be %d, is %d", rank, mask_rank);
|
||||
|
||||
for (n=0; n<rank; n++)
|
||||
{
|
||||
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
|
||||
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
|
||||
if (array_extent != mask_extent)
|
||||
runtime_error ("Incorrect extent in MASK argument of"
|
||||
" MINLOC intrinsic in dimension %d:"
|
||||
" is %ld, should be %ld", n + 1,
|
||||
(long int) mask_extent, (long int) array_extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
|
||||
|
@ -312,11 +352,20 @@ sminloc0_4_i16 (gfc_array_i4 * const restrict retarray,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (GFC_DESCRIPTOR_RANK (retarray) != 1)
|
||||
runtime_error ("rank of return array does not equal 1");
|
||||
if (compile_options.bounds_check)
|
||||
{
|
||||
int ret_rank;
|
||||
index_type ret_extent;
|
||||
|
||||
if (retarray->dim[0].ubound + 1 - retarray->dim[0].lbound != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
|
||||
if (ret_rank != 1)
|
||||
runtime_error ("rank of return array in MINLOC intrinsic"
|
||||
" should be 1, is %d", ret_rank);
|
||||
|
||||
ret_extent = retarray->dim[0].ubound + 1 - retarray->dim[0].lbound;
|
||||
if (ret_extent != rank)
|
||||
runtime_error ("dimension of return array incorrect");
|
||||
}
|
||||
}
|
||||
|
||||
dstride = retarray->dim[0].stride;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue