Fix compilation failure with C++98 compilers
[official-gcc.git] / gcc / testsuite / gfortran.dg / contiguous_4.f90
blob874ef8ba9ecd8c97336d7bb6d7d21437e640844f
1 ! { dg-do compile }
2 program cont_01_neg
3 implicit none
4 real, pointer, contiguous :: r(:)
5 real, pointer, contiguous :: r2(:,:)
6 real, target :: x(45)
7 real, target :: x2(5,9)
8 integer :: i
9 integer :: n=1
11 x = (/ (real(i),i=1,45) /)
12 x2 = reshape(x,shape(x2))
13 r => x(::3)
14 r2 => x2(2:,:)
15 r2 => x2(:,2:3)
16 r => x2(2:3,1)
17 r => x(::1)
18 r => x(::n)
19 end program