From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AE5653858D33; Sun, 18 Jun 2023 20:03:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE5653858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687118583; bh=OG5jr8cbSGIpjBlT3/2xuRxWMiM9Bdudgf4acfCSvBY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hm8rDCNrWSo1da1rL16SMrdJ91C9KPKFh+3K60f7juBO2CdGQk+8vOLWpfZZxy5NM 1UCNF6WqObbZEzMiHhQzG8LC0S7RByTWgrAJGg6yZgYecnydDReQBYDagEhi7SAGnu s9hIReCnaK1/EM/lErwTvF0km8W6f11lg/cOgzGw= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/92887] [F2008] Passing nullified/disassociated pointer or unalloc allocatable to OPTIONAL + VALUE dummy fails Date: Sun, 18 Jun 2023 20:03: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: 10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf 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: attachments.isobsolete attachments.created 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=3D92887 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55356|0 |1 is obsolete| | --- Comment #4 from anlauf at gcc dot gnu.org --- Created attachment 55360 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55360&action=3Dedit Patch v2, handles most of pr92887 and pr92178 This patch tries to gather temporary handling as needed by pr92887 and pr92= 178 and implements a simple "conditional temporary" for the case that we cannot dereference a disassociated pointer or unallocated allocatable (also only scalar version for now). There is still the issue for character variables and expression, which I th= ink is independent of the present pr. I'll need broader feedback, so unless someone adds to this pr, I'll submit the present patch - with testcases - to get attention. Regtests ok here, BTW.=