| 1 |
! { dg-do run } |
| 2 |
! |
| 3 |
! Tests fix for PR82184 |
| 4 |
! |
| 5 |
! Contributed by Andrey Guskov <[email protected]) |
| 6 |
! |
| 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 |