2 ! PR 20074: This used to segfault at runtime.
3 ! Test case contributed by "Alfredo Buttari" <pitagoras@tin.it>
7 integer,allocatable :: vect1(:),resh1(:,:)
8 integer,pointer :: vect(:),resh(:,:)
9 integer :: vect2(2*4), resh2(2,4)
16 allocate(vect(nb*r),vect1(nb*r))
17 allocate(resh(r,nb),resh1(r,nb))
23 resh2 = reshape(vect2,s)
24 if (resh2(1,1) /= 1.0) call abort
26 resh1 = reshape(vect1,s)
27 if (resh1(1,1) /= 1.0) call abort
29 resh = reshape(vect,s)
30 if (resh(1,1) /= 1.0) call abort
32 end program tryreshape