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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #14 from anlauf at gcc dot gnu.org ---
The current solution is a bit annoying for implicitly-derived interfaces.

Consider a code like:

module foo
  implicit none
  type t1
     integer :: i = 1
  end type t1
  type t2
     integer :: j = 2
  end type t2
contains
  subroutine s1 (x)
    type(t1) :: x
    call my_mpi_bcast_wrapper (x, storage_size (x)/8)
  end subroutine s1
  subroutine s2 (y)
    type(t2) :: y
    call my_mpi_bcast_wrapper (y, storage_size (y)/8)
  end subroutine s2
end module foo

That's perfectly legal, but gets rejected unless -fallow-argument-mismatch
is specified.  But then I still get a warning (or many if this appears in
a large module).

I know that there is a (quite clumsy) solution to the above by providing
many dummy interfaces, just to defeat the checking.

I would like to see an error only for explicit interfaces.  But e.g. for
packages like MPI, where the mpi_* routines can handle different argument
types, and where by default one doesn't need (or want) an explicit interface,
I'd hope that that the checks could be downgraded.

Reply via email to