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

Tobias Burnus tobias.burnus@physik.fu-berlin.de
Wed Oct 17 08:35:00 GMT 2018


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr87625_realloc_on_assign.diff
Type: text/x-diff
Size: 2052 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181017/daba15f8/attachment.bin>


More information about the Fortran mailing list