arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / vector_subscript_8.f90
blobe90450b2f1b53b0f798d317df2f02941e59696fc
1 ! { dg-do run }
3 ! PR fortran/102043
4 ! The middle-end used to conclude from array indexing that the index
5 ! should be non-negative and thus that array accesses to reversed arrays
6 ! (i.e. with negative strides) only access the last element of the array,
7 ! as the access involves a pointer to array that is initialized to point
8 ! to the last element in the case of a reversed array.
10 program main
11 integer, dimension (4) :: idx, a, b
12 a = (/ 11, 13, 17, 19 /)
13 idx = (/ 1, 2, 3, 4 /)
14 a(idx(4:1:-1)) = idx
15 if (a(1).ne.4) STOP 1
16 end program main