From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A0A64386C5AC; Fri, 29 Sep 2023 13:13:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0A64386C5AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695993235; bh=UXfl7ypylhC/RfXdbtCXml3AnLFjZHvgzXFJ2ik/Kec=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LPt7Qw2MGGXfiMBwXEGdaU3qttXUUpgwfG4TclD+lAMIcNi+yohJcy8Cq0YDXM+DX pWCNU1aGdesMYlMRXAQeTpTUTHo69ZKMuVaw6cgBKq2LjvwGBiyQgE38goXdVusXQq MjOMq/rvQpj9j5hvsSkSImRhWaVSK4V9Br+nZD9M= 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 13:13:55 +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 #35 from CVS Commits --- The releases/gcc-13 branch has been updated by Andre Vehreschild : https://gcc.gnu.org/g:d9b3269bdccac2db9200303494c4e82f2aeb7bbc commit r13-7923-gd9b3269bdccac2db9200303494c4e82f2aeb7bbc 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. (cherry picked from commit 9a63a62dfd73e159f1956e9b04b555c445de4e78)=