From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C0B133858C50; Tue, 3 Oct 2023 10:06:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C0B133858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696327606; bh=PMUQCeHAKGg4Si18kR9d4lXWbb15duXoduh73FXrXjM=; h=From:To:Subject:Date:From; b=UsNCSoqOjDO8cdvkA6ZZWc1Nunw72tsglozbnePix1sUdgcdX4c8sxmeABjvnrkXr bmy9/8AWDgP5u/c+Mklrc2ilr2bg4imtVvGGQ6m0xxXfkihQQO28SS9q8sKOKBNmgp IpvMlUp+Z3v/vBtXsdTmb5CV16QwPQSKmQlALwNY= From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/111674] New: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type Date: Tue, 03 Oct 2023 10:06:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pault at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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=3D111674 Bug ID: 111674 Summary: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type Product: gcc Version: 13.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: pault at gcc dot gnu.org Target Milestone: --- Created attachment 56035 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56035&action=3Dedit Testcase demonstrating the bug Introduced by r13-6747-gd7caf313525a46f200d7f5db1ba893f853774aee See the attached testcase, which was developed to check F2018 compliance in= the Chivers/Sleightholme compliance tables. gfortran correctly determines from 7.5.6.1 that y is not finalizable. Howev= er, following the first paragraph in 7.5.6.3, the component y%aa should be finalized before deallocation in the second assignment. 12-branch used to do this but 13-branch and mainline currently do not. Note, that 12-branch does not finalize x in its second assignment, as it should. Fortunately the fix is trivial and will be posted in the first comment. Paul=