[Bug fortran/110618] Dependency between arguments when one is allocatable array whose dummy is intent(out)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110618 Mikael Morin changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Mikael Morin --- Fixed for 14.0.
[Bug fortran/110618] Dependency between arguments when one is allocatable array whose dummy is intent(out)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110618 --- Comment #4 from CVS Commits --- The master branch has been updated by Mikael Morin : https://gcc.gnu.org/g:e21e13e2525a042a0aabfbcb4ebf4f08609078c7 commit r14-2580-ge21e13e2525a042a0aabfbcb4ebf4f08609078c7 Author: Mikael Morin Date: Mon Jul 17 14:14:22 2023 +0200 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.
[Bug fortran/110618] Dependency between arguments when one is allocatable array whose dummy is intent(out)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110618 --- Comment #3 from CVS Commits --- The master branch has been updated by Mikael Morin : https://gcc.gnu.org/g:1a46400e5ac0f21eead74b10752f69ebc7a8be27 commit r14-2579-g1a46400e5ac0f21eead74b10752f69ebc7a8be27 Author: Mikael Morin Date: Mon Jul 17 14:14:18 2023 +0200 fortran: Use pre-evaluated class container if available [PR110618] Add the possibility to provide a pre-evaluated class container argument to gfc_add_finalizer to avoid repeatedly evaluating data reference expressions in the generated code. PR fortran/110618 gcc/fortran/ChangeLog: * trans.h (gfc_add_finalizer_call): Add class container argument. * trans.cc (gfc_add_finalizer_call): Ditto. Pass down new argument to get_final_proc_ref, get_elem_size, get_var_desc, and get_vptr. (get_elem_size): Add class container argument. Use provided class container if it's available. (get_var_descr): Same. (get_vptr): Same. (get_final_proc_ref): Same. Add boolean telling the class container argument is used. Set it. Don't try to use final_wrapper if class container argument was used.
[Bug fortran/110618] Dependency between arguments when one is allocatable array whose dummy is intent(out)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110618 Mikael Morin changed: What|Removed |Added Last reconfirmed||2023-07-13 Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |mikael at gcc dot gnu.org --- Comment #2 from Mikael Morin --- Patches submitted: https://gcc.gnu.org/pipermail/fortran/2023-July/059596.html https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624384.html
[Bug fortran/110618] Dependency between arguments when one is allocatable array whose dummy is intent(out)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110618 --- Comment #1 from Mikael Morin --- Created attachment 55517 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55517&action=edit Draft patch This seems to work for this case, but I'm not sure how reliable it is.