aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/st.cc
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2023-07-17 14:14:22 +0200
committerMikael Morin <mikael@gcc.gnu.org>2023-07-17 14:14:22 +0200
commite21e13e2525a042a0aabfbcb4ebf4f08609078c7 (patch)
tree9a23f6dcc8ca07ebc64f76b561d55a9417ec6e74 /gcc/fortran/st.cc
parent1a46400e5ac0f21eead74b10752f69ebc7a8be27 (diff)
downloadgcc-e21e13e2525a042a0aabfbcb4ebf4f08609078c7.zip
gcc-e21e13e2525a042a0aabfbcb4ebf4f08609078c7.tar.gz
gcc-e21e13e2525a042a0aabfbcb4ebf4f08609078c7.tar.bz2
fortran: Pass pre-calculated class container argument [pr110618]
Pass already evaluated class container argument from gfc_conv_procedure_call down to gfc_add_finalizer_call through gfc_deallocate_scalar_with_status and gfc_deallocate_with_status, to avoid repeatedly evaluating the same data reference expressions in the generated code. PR fortran/110618 gcc/fortran/ChangeLog: * trans.h (gfc_deallocate_with_status): Add class container argument. (gfc_deallocate_scalar_with_status): Ditto. * trans.cc (gfc_deallocate_with_status): Add class container argument and pass it down to gfc_add_finalize_call. (gfc_deallocate_scalar_with_status): Same. * trans-array.cc (structure_alloc_comps): Update caller. * trans-stmt.cc (gfc_trans_deallocate): Ditto. * trans-expr.cc (gfc_conv_procedure_call): Ditto. Pass pre-evaluated class container argument if it's available. gcc/testsuite/ChangeLog: * gfortran.dg/intent_out_22.f90: New test.
Diffstat (limited to 'gcc/fortran/st.cc')
0 files changed, 0 insertions, 0 deletions