public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <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: Fri, 01 Jan 2021 23:15:16 +0000	[thread overview]
Message-ID: <bug-96986-4-rqJtvrcgGZ@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

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 particular
! 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 properly
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.

  parent reply	other threads:[~2021-01-01 23:15 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 [this message]
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
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-rqJtvrcgGZ@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).