public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/94407] New: Spurious Error: ‘rw_nl_grid’ must be a module procedure or an external procedure
@ 2020-03-30 16:03 michalak at ucar dot edu
  2020-03-31  7:21 ` [Bug fortran/94407] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: michalak at ucar dot edu @ 2020-03-30 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94407
           Summary: Spurious Error: ‘rw_nl_grid’ must be a module
                    procedure or an external procedure
           Product: gcc
           Version: 9.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: michalak at ucar dot edu
  Target Milestone: ---

The following session log contains a listing of the reproducer program,
test.F90, and a set of compile and run commands that demonstrate the issue. 
This was collected on the NCAR supercomputer cheyenne.ucar.edu using Intel,
then PGI, then GCC Fortran compilers. Intel and PGI compile the code without
issue. Note: although the session log indicates gnu/8.3.0, the test was also
run with the most recent version of gcc installed on Cheyenne, 9.1.0, and
produced identical results.  Thank you.  


John Michalakes, Software Engineer
Cooperative Programs for the Advancement of Earth System Sciences (CPAESS)
University Corporation for Atmospheric Research
michalak@ucar.edu

===


cheyenne:/glade/u/home/michalak/nf 1007 > cat session.txt
Script started on Sun 29 Mar 2020 05:58:20 AM MDT
> cat test.F90
module mod_input
  type config_t
    integer :: domain_id
    contains
    procedure :: init      => rw_config
    procedure :: rw_nl_grid
  end type config_t
  type namelist_t
    type(config_t) :: config
  end type namelist_t
  interface
    module subroutine rw_config (this,iunit)
      implicit none
      class (config_t) :: this
      integer, intent(in), optional :: iunit
    end subroutine rw_config
    module subroutine rw_nl_grid ( this, iunit )
      implicit none
      class (config_t) :: this
      integer, optional, intent(in) :: iunit
    end subroutine rw_nl_grid
  end interface
  contains
    module subroutine rw_config (this,iunit)
      implicit none
      class (config_t) :: this
      integer, intent(in), optional :: iunit
      call this%rw_nl_grid
    end subroutine rw_config
    module subroutine rw_nl_grid ( this, iunit )
      implicit none
      class (config_t) :: this
      integer, optional, intent(in) :: iunit
    end subroutine rw_nl_grid
end module mod_input

module neptune_write_native
  contains
  subroutine Run
    use mod_input
    type(namelist_t)            :: nl
  end subroutine Run
end module neptune_write_native

> module load intel

Lmod is automatically replacing "gnu/8.3.0" with "intel/18.0.5".


Due to MODULEPATH changes, the following have been reloaded:
  1) hdf5-mpi/1.10.5     2) mpt/2.19     3) ncarcompilers/0.5.0

michalak/nf> ifort -c test.F90
michalak/nf> module load pgi

Lmod is automatically replacing "intel/18.0.5" with "pgi/19.3".


Due to MODULEPATH changes, the following have been reloaded:
  1) hdf5-mpi/1.10.5     2) mpt/2.19     3) ncarcompilers/0.5.0

> pgf90 -c test.F90
> module load gnu

Lmod is automatically replacing "pgi/19.3" with "gnu/8.3.0".


Due to MODULEPATH changes, the following have been reloaded:
  1) hdf5-mpi/1.10.5     2) mpt/2.19     3) ncarcompilers/0.5.0

> gfortran test.F90
test.F90:40:8:

     use mod_input
        1
Error: ‘rw_nl_grid’ must be a module procedure or an external procedure with an
explicit interface at (1)
michalak/nf> exit
exit

Script done on Sun 29 Mar 2020 05:59:25 AM MDT

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

* [Bug fortran/94407] Spurious Error: ‘rw_nl_grid’ must be a module procedure or an external procedure
  2020-03-30 16:03 [Bug fortran/94407] New: Spurious Error: ‘rw_nl_grid’ must be a module procedure or an external procedure michalak at ucar dot edu
@ 2020-03-31  7:21 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-03-31  7:21 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
dup

*** This bug has been marked as a duplicate of bug 94408 ***

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

end of thread, other threads:[~2020-03-31  7:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 16:03 [Bug fortran/94407] New: Spurious Error: ‘rw_nl_grid’ must be a module procedure or an external procedure michalak at ucar dot edu
2020-03-31  7:21 ` [Bug fortran/94407] " 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).