PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_array_9.f90
blob4c0336ef361e02a55fe738c1950a4a1661592e2e
1 ! { dg-do run }
3 ! Tests fix for PR82184
5 ! Contributed by Andrey Guskov <andrey.y.guskov@intel.com)
7 program r187
8 call s()
9 call s()
10 contains
11 subroutine s()
12 complex(4), allocatable, save :: a(:, :)
13 complex(4), pointer, save :: b(:, :)
14 if (.not. associated(b)) then
15 allocate(a(2, 2))
16 allocate(b(2, 2))
17 a = reshape ([cmplx(1, 1), cmplx(2, 2), cmplx(1, 2), cmplx(2, 1)], [2,2])
18 else
19 b = transpose(a)
20 if (merge("PASSED", "FAILED", all (transpose (a) .eq. b)) .eq. "FAILED") STOP 1
21 end if
22 end subroutine s
23 end program r187