public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.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: Sat, 02 Jan 2021 20:50:31 +0000	[thread overview]
Message-ID: <bug-96986-4-nMEuVg5z08@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96986-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96986

--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
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=96986
> 
> --- 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
> 
> Well, I stumbled over the "additional subroutine".
> 
> I assume that the "additional subroutine" wouldn't exist without the containing
> subprogram in the first place.  Maybe a consultation of c.l.f. could help.
> 

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 

Here, only fun_b() requires an explicit interface if it is
used in another scoping unit.  AFAICT, a programmer is  
required to add 

interface
   subroutine fun_b(va)
      integer, volatile :: va
   end subroutine fun_b
end interface

to that scoping unit.

  parent reply	other threads:[~2021-01-02 20:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 19:22 [Bug fortran/96986] New: [8 " foreese at gcc dot gnu.org
2020-09-09  6:44 ` [Bug fortran/96986] [8/9/10/11 " rguenth at gcc dot gnu.org
2020-12-14 12:49 ` dominiq at lps dot ens.fr
2021-01-01 20:04 ` anlauf at gcc dot gnu.org
2021-01-01 21:46 ` foreese at gcc dot gnu.org
2021-01-01 23:15 ` anlauf at gcc dot gnu.org
2021-01-02  1:32 ` kargl at gcc dot gnu.org
2021-01-02 19:53 ` anlauf at gcc dot gnu.org
2021-01-02 20:50 ` sgk at troutmask dot apl.washington.edu [this message]
2021-05-14  9:53 ` [Bug fortran/96986] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:18 ` rguenth at gcc dot gnu.org
2022-05-27  9:43 ` [Bug fortran/96986] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:41 ` jakub at gcc dot gnu.org
2023-07-07 10:38 ` [Bug fortran/96986] [11/12/13/14 " rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-96986-4-nMEuVg5z08@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).