arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / is_contiguous_1.f90
blobee592f27f6d1e07696a45582647a675240f5405a
1 ! { dg-do run }
3 ! PR fortran/45424
4 ! PR fortran/48820
6 ! Run-time checks for IS_CONTIGUOUS
8 implicit none
9 integer, pointer :: a(:), b(:,:)
10 integer :: i, j, k, s
12 allocate(a(5), b(10,10))
14 s = 1
15 if (.true. .neqv. is_contiguous (a(::s))) stop 1
16 s = 2
17 if (.false. .neqv. is_contiguous (a(::s))) stop 2
18 i=5; j=7
19 if (.true. .neqv. is_contiguous (b(1:i*2,1:j))) stop 3
20 if (.false. .neqv. is_contiguous (b(1:i,1:j))) stop 4
21 i=5; j=5; s=1
22 if (.false. .neqv. is_contiguous (b(i:5:s,i:j*2))) stop 5
24 ! The following test zero-sized arrays. For the standard, they
25 ! are regarded as noncontiguous. However, gfortran in line with
26 ! other compilers only checks for the strides and thus prints
27 ! .true. or .false. depending on this setting.
29 s = 4
30 if (.false. .neqv. is_contiguous (a(2:1:s))) stop 6
31 s = 1
32 if (.true. .neqv. is_contiguous (a(2:1:s))) stop 7
33 end