PGF90-S-0155

One of my program fails with following error when compiled pgf90 15.4 compiler. However it works well with gfortran compiler.

PGF90-S-0155-Ambiguous interfaces for generic procedure

Google search gives some links about bug with fortran compilers. So please let me know is it a bug with compiler or a programming error?

It could be caused by any of the reasons, but you will have to show the interface in sufficient detail. Older versions of compilers may do a less thorough job of checking declarations and interface consistency.

If possible, please post a small, complete program unit whose compilation shows up the problem.

The error is due to gather and bcast subroutines:

Details about the code:

INTERFACE gather
    MODULE PROCEDURE gather_i,gather_i1,gather_i2,gather_i3, &
                     gather_r,gather_r1,gather_r2,gather_r3, &
                     gather_l,gather_l1,gather_l2,gather_l3
  END INTERFACE

the code is compiled with -r8 -DNC_DOUBLE

Hi SanBc,

The above error indicates that two or more of your generic procedures have the same signature so the compiler can’t which one you want called. My guess given you’re using “-r8” is that one of the procedures expects “REAL” while another expects “REAL(KIND=8)”. -r8 changes the default kind of “REAL” to 8 and would cause these two procedures to have the same types in the argument list.

If this isn’t the problem, please post the arguments and their type from the gather procedures.

Hope this helps,
Mat