PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / parameter_array_section_2.f90
blob0ecbce3434ddfa07cc5f576d8567c823932f85fc
1 ! { dg-do run }
2 ! { dg-options "-O" }
3 ! Test the fix for PR31011 in which the length of the array sections
4 ! with stride other than unity were incorrectly calculated.
6 ! Contributed by <terry@chem.gu.se>
8 program PotentialMatrix
9 implicit none
10 real(kind=8),dimension(2),parameter::v2=(/1,2/)
11 real(kind=8),dimension(4),parameter::v4=(/1,2,3,4/)
12 if (any (v2*v4(1:3:2) .ne. (/1,6/))) STOP 1
13 if (any (v2*v4(3:1:-2) .ne. (/3,2/))) STOP 2
14 end