PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / shape_4.f90
blobac79fa1a33cd95a7fe65c4e9321bbefa4df741a1
1 ! { dg-do run }
2 ! PR 35001 - we need to return 0 for the shapes of
3 ! negative extents. Test case adapted from Tobias Burnus.
4 program main
5 implicit none
6 integer :: i,j, a(10,10),res(2)
7 j = 1
8 i = 10
9 res = shape(a(1:1,i:j:1))
10 if (res(1) /=1 .or. res(2) /= 0) STOP 1
11 res = shape(a(1:1,j:i:-1))
12 if (res(1) /=1 .or. res(2) /= 0) STOP 2
13 end program main