diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2023-02-25 21:37:46 +0100 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2023-02-25 21:37:46 +0100 |
commit | 5c638095e7e0fa4de4e4f7326384a86830b25732 (patch) | |
tree | b7e38b5618004a11affd5490b2e7056735138b00 /libgfortran/generated/spread_r17.c | |
parent | a24b2720de5d888a936c350378ae864b81f1a022 (diff) | |
download | gcc-5c638095e7e0fa4de4e4f7326384a86830b25732.zip gcc-5c638095e7e0fa4de4e4f7326384a86830b25732.tar.gz gcc-5c638095e7e0fa4de4e4f7326384a86830b25732.tar.bz2 |
fortran: Reuse associated_dummy memory if previously allocated [PR108923]
This avoids making the associted_dummy field point to a new memory chunk
if it's already pointing somewhere, in which case doing so would leak the
previously allocated chunk.
PR fortran/108923
gcc/fortran/ChangeLog:
* intrinsic.cc (get_intrinsic_dummy_arg,
set_intrinsic_dummy_arg): Rename the former to the latter.
Remove the return value, add a reference to the lhs as argument,
and do the pointer assignment inside the function. Don't do
it if the pointer is already non-NULL.
(sort_actual): Update caller.
Diffstat (limited to 'libgfortran/generated/spread_r17.c')
0 files changed, 0 insertions, 0 deletions