https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82184
--- Comment #5 from Andrey Guskov <andrey.y.guskov at intel dot com> ---
program r187
call s()
call s()
contains
subroutine s()
complex(4), allocatable, save :: a(:, :)
complex(4), pointer, save :: b(:, :)
if (.not. associated(b)) then
allocate(a(2, 2))
allocate(b(2, 2))
a(1, 1) = cmplx(12, 34)
a(2, 2) = cmplx(56, 78)
else
b = transpose(a)
print *, merge("PASSED", "FAILED", a(1, 1) .eq. b(1, 1))
end if
end subroutine s
end program r187
# pre-r251949
$ gfortran -Ofast r187.f90 -o r187 && ./r187
PASSED
# post-r251949
$ gfortran -Ofast r187.f90 -o r187 && ./r187
FAILED