diff options
author | Andre Vehreschild <vehre@gcc.gnu.org> | 2023-07-19 11:57:43 +0200 |
---|---|---|
committer | Andre Vehreschild <vehre@gcc.gnu.org> | 2024-06-07 09:40:17 +0200 |
commit | 51046e46ae66ca95bf2b93ae60f0c4d6b338f8af (patch) | |
tree | 911f8c0f57378cee7e51767f3ca59f5eb204b6b2 /gcc/tree-vect-loop.cc | |
parent | 3472b5749df53b91bcb00a3e82cc85ef1f3b17ce (diff) | |
download | gcc-51046e46ae66ca95bf2b93ae60f0c4d6b338f8af.zip gcc-51046e46ae66ca95bf2b93ae60f0c4d6b338f8af.tar.gz gcc-51046e46ae66ca95bf2b93ae60f0c4d6b338f8af.tar.bz2 |
Fix returned type to be allocatable for user-functions.
The returned type of user-defined function returning a
class object was not detected and handled correctly, which
lead to memory leaks.
PR fortran/90072
gcc/fortran/ChangeLog:
* expr.cc (gfc_is_alloc_class_scalar_function): Detect
allocatable class return types also for user-defined
functions.
* trans-expr.cc (gfc_conv_procedure_call): Same.
(trans_class_vptr_len_assignment): Compute vptr len
assignment correctly for user-defined functions.
gcc/testsuite/ChangeLog:
* gfortran.dg/class_77.f90: New test.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions