pgf90 13.10 Type-bound procedures hide intrinsic procedures

It seems that when a type-bound procedure has the same name as an intrinsic procedure, the intrinsic procedure becomes hidden and unavailable. I don’t think this is the proper behavior per the Fortran 2008 standard. ifort, gfortran, and xlf all handle type-bound procedures that have the same name as intrinsics without hiding the intrinsics.

As an example, the following program did not work for me (using pgf90 13.10 on Linux):

program pgi_hideintrinsic

  type :: d
    integer :: value
    procedure :: size => d_size
  end type

  integer :: array(5,5)

  print *, size(array,1)

  subroutine d_size()
  end subroutine d_size
end program pgi_hideintrinsic

This code gives me the following error:

~> pgfortran pgi_hideintrinsic.f90
PGF90-S-0187-Too many arguments specified for d_size (pgi_hideintrinsic.f90: 11)
PGF90-S-0000-Internal compiler error. size_of: bad dtype        0 (pgi_hideintrinsic.f90: 11)
PGF90-S-0000-Internal compiler error. size_of: bad dtype         0 (pgi_hideintrinsic.f90: 11)
  0 inform,   0 warnings,   3 severes, 0 fatal for pgi_hideintrinsic

Thanks Paul, I’ve replicated the behavior here and sent a report to engineering (TPR#19795) for further investigation.

  • Mat

TPR 19795 - User code using type-bound procedure named “size” causes a compiler ICE/segv

has been fixed in the current 14.3 release.