https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41453

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Mikael Morin <mik...@gcc.gnu.org>:

https://gcc.gnu.org/g:77bbf69d2981dafc2ef3e59bfbefb645d88bab9d

commit r13-2841-g77bbf69d2981dafc2ef3e59bfbefb645d88bab9d
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Thu Sep 1 12:35:07 2022 +0200

    fortran: Support clobbering of derived types [PR41453]

    This adds support for clobbering of non-polymorphic derived type
    variables, when they are passed as actual argument whose associated
    dummy has the INTENT(OUT) attribute.

    We avoid to play with non-constant type sizes or class descriptors by
    requiring that the types are derived (not class) and strictly matching,
    and by excluding parameterized derived types.

    Types that are used in the callee are also excluded: they are types with
    allocatable components (the components will be deallocated), and
    finalizable types or types with finalizable components (they will be
    passed to finalization routines).

            PR fortran/41453

    gcc/fortran/ChangeLog:

            * trans-expr.cc (gfc_conv_procedure_call): Allow strictly
            matching derived types.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/intent_optimize_10.f90: New test.

Reply via email to