public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/96986] New: [8 Regression] Explicit interface required: volatile argument for ENTRY subroutine
@ 2020-09-08 19:22 foreese at gcc dot gnu.org
  2020-09-09  6:44 ` [Bug fortran/96986] [8/9/10/11 " rguenth at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: foreese at gcc dot gnu.org @ 2020-09-08 19:22 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-07-07 10:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-08 19:22 [Bug fortran/96986] New: [8 Regression] Explicit interface required: volatile argument for ENTRY subroutine 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
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

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).