pgf90 13.10 -- ICE with integer(8) in abstract interface

I ran into an internal compiler error on the following code (I’ve tried to simplify it as much as possible) when trying to compile with -i8:

module pgi_ice

  type, abstract :: abstracttype
  contains
    procedure(bad_interface), deferred :: bound_procedure
  end type abstracttype

  abstract interface
    function bad_interface(this, n) result(val)
      import :: abstracttype
      class(abstracttype) :: this
      integer, intent(in) :: n
      real                :: val(n)
    end function bad_interface
  end interface

end module pgi_ice

Compiling this gives the following:

~> pgfortran -i8 -c pgi_ice.f90
Lowering Error: array upper bound is not a symbol for datatype 65
Lowering Error: array extnt is not a symbol for datatype 65
PGF90-F-0000-Internal compiler error. Errors in Lowering       2 (pgi_ice.f90: 17)
PGF90/x86-64 Linux 13.10-0: compilation aborted

Note that if instead of compiling with -i8, I declare the argument n as integer(8) explicitly and then compile without -i8, I still get the same ICE. With no integer(8)s, the code compiles fine. It also compiles successfully with ifort and gfortran regardless of what kind the integers are.

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

  • Mat

TPR 19796 - User code causes ICE “array upper bound is not a symbol for datatype”

has been fixed in the 14.3 release, out now.

dave