Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/shape_4.f90 @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line source
! { dg-do run } ! PR 35001 - we need to return 0 for the shapes of ! negative extents. Test case adapted from Tobias Burnus. program main implicit none integer :: i,j, a(10,10),res(2) j = 1 i = 10 res = shape(a(1:1,i:j:1)) if (res(1) /=1 .or. res(2) /= 0) STOP 1 res = shape(a(1:1,j:i:-1)) if (res(1) /=1 .or. res(2) /= 0) STOP 2 end program main