From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 777C1385803D; Sat, 2 Jan 2021 20:50:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 777C1385803D From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/96986] [8/9/10/11 Regression] Explicit interface required: volatile argument for ENTRY subroutine Date: Sat, 02 Jan 2021 20:50:31 +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: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 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 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: Sat, 02 Jan 2021 20:50:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96986 --- Comment #7 from Steve Kargl -= -- On Sat, Jan 02, 2021 at 07:53:17PM +0000, anlauf at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96986 >=20 > --- Comment #6 from anlauf at gcc dot gnu.org --- > (In reply to kargl from comment #5) > > If the ENTRY statement is in a subroutine subprogram, an additional > > subroutine is defined by that subprogram. The name of the subroutine > > is entry-name. The dummy arguments of the subroutine are those > > specified in the ENTRY statement >=20 > Well, I stumbled over the "additional subroutine". >=20 > I assume that the "additional subroutine" wouldn't exist without the cont= aining > subprogram in the first place. Maybe a consultation of c.l.f. could help. >=20 Not sure what you think clf will provide. Seems clear to me that subroutine volatile_test() integer, volatile :: va entry fun_a() return entry fun_b(va) call fun_c() return end subroutine volatile_test is equivalent subroutine volatile_test() integer, volatile :: va return call fun_c() return end subroutine volatile_test subroutine fun_a() integer, volatile :: va return call fun_c() return end subroutine fun_a() subroutine fun_b(va) integer, volatile :: va call fun_c() return end subroutine fun_b=20 Here, only fun_b() requires an explicit interface if it is used in another scoping unit. AFAICT, a programmer is=20=20 required to add=20 interface subroutine fun_b(va) integer, volatile :: va end subroutine fun_b end interface to that scoping unit.=