public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "foreese at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/96986] New: [8 Regression] Explicit interface required: volatile argument for ENTRY subroutine
Date: Tue, 08 Sep 2020 19:22:46 +0000	[thread overview]
Message-ID: <bug-96986-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 96986
           Summary: [8 Regression] Explicit interface required: volatile
                    argument for ENTRY subroutine
           Product: gcc
           Version: 8.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: foreese at gcc dot gnu.org
  Target Milestone: ---

Created attachment 49200
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49200&action=edit
Testcase which exhibits the regression

GCC 8.3.1 does not accept the following program, but all versions 4.x through
7.x and <= 8.3.0 do:

$ cat volatile.for
      subroutine volatile_test ()
        implicit none
        integer(4), volatile :: va

        entry fun_a()
        return

        entry fun_b(va)
          call fun_c()
        return
      end

      subroutine fun_c ()
        implicit none
        call fun_a()
        return
      end
$ gfortran -std=legacy -c volatile.for
volatile.for:15:18:

         call fun_a()
                  1
Error: Explicit interface required for ‘fun_a’ at (1): volatile argument


It seems that because fun_b() has a volatile argument, the subroutine
volatile_test() is marked as such. Subsequently the call to fun_a() from
fun_c() within the same procedure trips the error.

The regression appears to have been introduced in r269895 on gcc-9 which fixed
PR 78865. The fix was backported to gcc-8 by r270032 and released as part of
8.3.1.

             reply	other threads:[~2020-09-08 19:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 19:22 foreese at gcc dot gnu.org [this message]
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
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@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).