From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 555353858D35; Thu, 9 Nov 2023 18:18:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 555353858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699553902; bh=qE5TObiHUcJKpXo3fDFDebBHEO6Y5pLfvrfbFF9GrbM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=C+Y1XvapijKygrjWSB8Ba7/DwG8gXdOTCKLLeXwYkVx18/XgekCo6XpNZrF/Y0ovW qUh1SWpPBNGAg1C/BbumrIqRHRbJiOctC6kLZy7UEs1Rf6L7Fr6tGJRleqBGLkh9Gb ZfdMWAsBXxeIkDpvYYbMcsH+UhnXvt69WoR3ACbc= From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/112459] gfortran -w option causes derived-type finalization at creation time Date: Thu, 09 Nov 2023 18:18:22 +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: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pault 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: cf_reconfirmed_on bug_status everconfirmed blocked 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=3D112459 Paul Thomas changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-11-09 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Blocks| |37336 --- Comment #2 from Paul Thomas --- It has been on my TODO list to partially revert the finalization of structu= re and array constructors so that gfortran behaves like nagfor and only "knows" about F2018. Finalization of constructors per se was removed in F2018 for v= ery good reasons! I am still working on the CLASS variants of PR99065. Perhaps I should put t= hat on one side and clean up finalization? @Sebastien - I will have to see what the -w switch does and why it should affect the code behaviour. I can confirm the behaviour that you describe, as Harald has already done. The F2003 and F2008 specific parts are blocked by: if (!gfc_notification_std (GFC_STD_F2018_DEL) && .... Evidently switching o= ff the warnings with -w causes this to return true! Cheers Paul Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D37336 [Bug 37336] [F03] Finish derived-type finalization=