[Bug fortran/58229] [F03] Memory leak with allocatable function result
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Aug 24 09:22:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58229
--- Comment #2 from janus at gcc dot gnu.org ---
(In reply to janus from comment #1)
> The second one is the allocate-on-assignment inside the function, which
> nevers gets freed. This *is* a bug. What should be done is: Create a
> temporary for the function result and free it after the call.
This probably needs to happen inside gfc_conv_procedure_call (trans-expr.c).
More information about the Gcc-bugs
mailing list