[Patch, Fortran] PR87625 - fix reallocate on assign with polymophic arrays

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Patch, Fortran] PR87625 - fix reallocate on assign with polymophic arrays

Tobias Burnus-2
for some reasons, the two calls to gfc_is_reallocatable_lhs(expr1) differ, the first
one is a simple "var" + full-array reference while the second one is
"var->_data" + full-array reference.

Neither was handled and, hence, using
  var = [ t(11), t(12) ]
didn't do any memory allocation; the program then simply segfaulted on assignment.

Build and regtested on x86-64-gnu-linux.
OK for the trunk?

Tobias

pr87625_realloc_on_assign.diff (2K) Download Attachment