diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2023-04-14 11:14:00 +0100 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2023-04-14 11:15:12 +0100 |
commit | b0e85485fbf042abccee5c0a9eb499da386c8db3 (patch) | |
tree | 2d26d1a45f52c274db699e9e80f993b37520b27c /gcc/range-op-float.cc | |
parent | bf24f2db2841b97bc5e86bf9294d61eef32f83b3 (diff) | |
download | gcc-b0e85485fbf042abccee5c0a9eb499da386c8db3.zip gcc-b0e85485fbf042abccee5c0a9eb499da386c8db3.tar.gz gcc-b0e85485fbf042abccee5c0a9eb499da386c8db3.tar.bz2 |
Fortran: Fix an excess finalization during allocation [PR104272]
2023-04-14 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/104272
* gfortran.h : Add expr3_not_explicit bit field to gfc_code.
* resolve.cc (resolve_allocate_expr): Set bit field when the
default initializer is applied to expr3.
* trans-stmt.cc (gfc_trans_allocate): If expr3_not_explicit is
set, do not deallocate expr3.
gcc/testsuite/
PR fortran/104272
* gfortran.dg/class_result_8.f90 : Number of builtin_frees down
from 6 to 5 without memory leaks.
* gfortran.dg/finalize_52.f90: New test
Diffstat (limited to 'gcc/range-op-float.cc')
0 files changed, 0 insertions, 0 deletions