https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120958
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #6 from anlauf at gcc dot gnu.org ---
(In reply to kargls from comment #5)
> (In reply to Martin Jambor from comment #1)
> > And indeed the following hack in Fortran FE "fixes" the benchmark (of
> > course, this is not meant as a proposed fix, just as a demonstration
> > where the problem is):
> >
>
> So, if I understand, you want an fnspec of ". . w w w w w w w".
> Can you show f->sym and f->sym-attr from gdb?
>
> Prior to F2008, MPI says the interface is
>
> USE MPI
> ! or the older form: INCLUDE 'mpif.h'
> MPI_IRECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR)
> <type> BUF(*)
> INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR
>
> with F2008, one has
>
> USE mpi_f08
> MPI_Irecv(buf, count, datatype, source, tag, comm, request, ierror)
> TYPE(*), DIMENSION(..), ASYNCHRONOUS :: buf
> INTEGER, INTENT(IN) :: count, source, tag
> TYPE(MPI_Datatype), INTENT(IN) :: datatype
> TYPE(MPI_Comm), INTENT(IN) :: comm
> TYPE(MPI_Request), INTENT(OUT) :: request
> INTEGER, OPTIONAL, INTENT(OUT) :: ierror
>
> in either case an explicit interface is required, and gfortran
> should deal with the '<type> buf(*)' and 'type(*), dimension(..)'
> without your hack. Of particular interest, is the f->sym->ts.type.
What if there is no explicit interface (use mpi), only 'incluce "mpif.h"'?
Does it imply that all non-blocking MPI calls are potentially affected?
This is really frightening...
(Of course a programmer must ensure that the actual argument is never a
temporary when used as argument with non-blocking comms, where even the
interfaces above do not help).