[flang] Don't change size of allocatable in error situation (#77386)
commit9fdd25e18c04f3543f7de9727f11f034498ca07e
authorPeter Klausler <35819229+klausler@users.noreply.github.com>
Mon, 15 Jan 2024 20:18:34 +0000 (15 12:18 -0800)
committerGitHub <noreply@github.com>
Mon, 15 Jan 2024 20:18:34 +0000 (15 12:18 -0800)
tree0cf46faf7c989183d2884417e06a7368274aecfa
parent7b8012338745ab16a88d78b3772d21dd6f87224b
[flang] Don't change size of allocatable in error situation (#77386)

When an already-allocated allocatable array is about to fail
reallocation, don't allow its size or other characteristics to be
changed.

Fixes
llvm-test-suite/Fortran/gfortran/regression/multiple_allocation_1.f90
and .../multiple_allocation_3.f90.
flang/runtime/allocatable.cpp