1! RUN: %S/test_folding.sh %s %t %f18 2! Test folding of IS_CONTIGUOUS on simply contiguous items (9.5.4) 3! When IS_CONTIGUOUS() is constant, it's .TRUE. 4 5module m 6 real, target :: hosted(2) 7 contains 8 function f() 9 real, pointer, contiguous :: f(:) 10 f => hosted 11 end function 12 subroutine test(arr1, arr2, arr3, mat) 13 real, intent(in) :: arr1(:), arr2(10), mat(10, 10) 14 real, intent(in), contiguous :: arr3(:) 15 real :: scalar 16 logical, parameter :: isc01 = is_contiguous(0) 17 logical, parameter :: isc02 = is_contiguous(scalar) 18 logical, parameter :: isc03 = is_contiguous(scalar + scalar) 19 logical, parameter :: isc04 = is_contiguous([0, 1, 2]) 20 logical, parameter :: isc05 = is_contiguous(arr1 + 1.0) 21 logical, parameter :: isc06 = is_contiguous(arr2) 22 logical, parameter :: isc07 = is_contiguous(mat) 23 logical, parameter :: isc08 = is_contiguous(mat(1:10,1)) 24 logical, parameter :: isc09 = is_contiguous(arr2(1:10:1)) 25 logical, parameter :: isc10 = is_contiguous(arr3) 26 logical, parameter :: isc11 = is_contiguous(f()) 27 end subroutine 28end module 29