MPI communicator type in Fortran 2008

I have been trying to build an application which uses ‘mpi_f08’. The problem is that it failed at compiling MPI calls. It took me a while to figure out that it was a communicator data type the real problem:

error #6285: There is no matching specific subroutine for this generic subroutine call. [MPI_BCAST]

USE mpi_f08

 SUBROUTINE foo (pe,nproc,comm)

      INTEGER :: pe,nproc,comm
      INTEGER, DIMENSION(22) :: psi
      INTEGER :: ierr
      CALL mpi_bcast( psi, 22, MPI_INTEGER, 0, comm, ierr)

Changing the comm datatype to TYPE(MPI_Comm) fixes the problem. Is there any other solution from the compiler point of view?

TYPE(MPI_Comm) is the correct coding.

Longer answer: Prior to ‘use mpi_f08’, an integer was sufficient for the communicator. However when using the older ‘use mpi’, or even worse, ‘include “mpif.h”’, there would be a lot less type/kind/rank and other checking on interfaces - leading to greater much possibility of errors.