From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1C1C7385782B; Mon, 17 Jul 2023 12:16:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C1C7385782B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689596209; bh=zp9YYUiIijXasAJ1VBJT3JH7+QM79T6kQLYYO23sGVA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OGP+jzQm8BJ/PyLhicA4DcKa1N9rolWvo2twM1p6FmFm7irs9iGuOsnT50RzcvHYz 5TzYYUBrPf6Bp48EL6fYUG6JvMSmio44IPxVJceeYPA3oJc/GLYjqqAPQDzA+SY5GN R+x4KIzXfrltANCLKkblNghAQzK3oS0ezPvDLjbI= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/110618] Dependency between arguments when one is allocatable array whose dummy is intent(out) Date: Mon, 17 Jul 2023 12:16:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.4.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mikael at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110618 --- 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.=