From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BCCB0384402B; Fri, 1 Jan 2021 23:15:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCCB0384402B From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/96986] [8/9/10/11 Regression] Explicit interface required: volatile argument for ENTRY subroutine Date: Fri, 01 Jan 2021 23:15:16 +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: 8.3.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P5 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords priority 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 23:15:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96986 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Priority|P4 |P5 --- Comment #4 from anlauf at gcc dot gnu.org --- (In reply to Fritz Reese from comment #3) > The error message blames fun_a() while neither fun_a() nor its containing > subroutine volatile_test() have a VOLATILE dummy argument. Do you think > 15.4.2.2 still applies? The standard has: ! 15.6.2.1 General ! A procedure is defined by the initial SUBROUTINE or FUNCTION statement of= a ! subprogram, and each ENTRY statement defines an additional procedure (15.6.2.6). ! 15.6.2.6 ENTRY statement ! An ENTRY statement permits a procedure reference to begin with a particul= ar ! executable statement within the function or subroutine subprogram in which ! the ENTRY statement appears. !... ! If the ENTRY statement is in a subroutine subprogram, an additional subroutine ! is defined by that subprogram. ... So basically I think the error is correct. Nevertheless the error message = is probably sub-optimal. Would you prefer it to refer to "volatile_test"? I personally do not use ENTRY in my own code, and I don't know how to prope= rly write an explicit interface for a similar subroutine including its entries. The best solution would be the use of modules, which is what I do. Downgrading to P5 / diagnostic.=