From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E362338582BE; Fri, 29 Sep 2023 12:57:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E362338582BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695992226; bh=Qni3BoRSUYcVk9j2qsubLVydnj2puTae4jI+MaxpfcA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pmg95SosRSv8YKXoTgi6blTncIyc+zOMTFKAZ12EpzS4j/t1kxXbawlLXTRZBmWPO cL9kwtbmW3WrxyiUwC9A8Qsdf9RvXe/Sp2YO2jApMW+OmLpHzBzJuKauRrFf4no/0J 5UJjQkYuywIVU//yZuiri3tAcVeI+vsdCdm7w/0A= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/37336] [F03] Finish derived-type finalization Date: Fri, 29 Sep 2023 12:57:02 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement 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: burnus 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=3D37336 --- Comment #34 from CVS Commits --- The master branch has been updated by Andre Vehreschild : https://gcc.gnu.org/g:a680274616ec6b26ccfdcee400ed7f54e341d40c commit r14-4331-ga680274616ec6b26ccfdcee400ed7f54e341d40c Author: Andre Vehreschild Date: Thu Sep 28 09:30:12 2023 +0200 Fortran: Free alloc. comp. in allocated coarrays only. When freeing allocatable components of an allocatable coarray, add a check that the coarray is still allocated, before accessing the components. This patch adds to PR fortran/37336, but does not fix it completely. gcc/fortran/ChangeLog: PR fortran/37336 * trans-array.cc (structure_alloc_comps): Deref coarray. (gfc_trans_deferred_array): Add freeing of components after check for allocated coarray. gcc/testsuite/ChangeLog: PR fortran/37336 * gfortran.dg/coarray/alloc_comp_6.f90: New test. * gfortran.dg/coarray/alloc_comp_7.f90: New test.=