From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 85A6C3854835; Sun, 25 Sep 2022 12:48:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85A6C3854835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664110118; bh=Lhm+LaOAL5fSCdKi4JGHZ7bzxTVgbQ7yZ2cEwkrxipA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hY+IfaNFOyCtlCHmPYn1+yKqgV4ConFbVe/f7JiT7Mb09T8+5dNYQZghsygptMaAf hxWhyXfzn7aK8rdtqSRUIeWhwRQy23XH8IF3GJXPqW1lQjH3Bkt89aMcAyvQOysaUu KoTw5W9+RQzVP+CiBFZBDBE+JAUJUrFrrGe73pEc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/41453] use INTENT(out) for optimization Date: Sun, 25 Sep 2022 12:48:38 +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: 4.5.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D41453 --- Comment #14 from CVS Commits --- The master branch has been updated by Mikael Morin : https://gcc.gnu.org/g:77bbf69d2981dafc2ef3e59bfbefb645d88bab9d commit r13-2841-g77bbf69d2981dafc2ef3e59bfbefb645d88bab9d Author: Mikael Morin 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.=