Lowering error

The code below, when compiled with PGI 6.1 gives two internal compiler errors:

pgf95 -c -g -I…/objs/finclude m_common_format.f90
Lowering Error: unknown intrinsic function [ast=65,asttype=14,datatype=60]
Lowering Error: unexpected data type at assignment [ast=120,asttype=17,datatype=0]
PGF90-F-0000-Internal compiler error. Errors in Lowering 2 (m_common_format.f90: 40)
PGF90/any Linux/x86 6.1-1: compilation aborted

module m_common_format

  implicit none


  pure function str_string(st) result(s)
    character(len=*), intent(in) :: st
    character(len=len(st)) :: s

    s = ''
  end function str_string

  pure function str_string_array_len(st) result(n)
    character(len=*), dimension(:), intent(in) :: st
    integer :: n

    n = 0

  end function str_string_array_len

  pure function str_string_array(st) result(s)
    character(len=*), dimension(:), intent(in) :: st
    character(len=str_string_array_len(st)) :: s
    s = ''

  end function str_string_array

  pure function str_string_matrix(st) result(s)
    character(len=*), dimension(:, :), intent(in) :: st
    character(len=str_string_array_len(reshape(st,(/size(st)/)))) :: s
    s = str_string_array(reshape(st,(/size(st)/)))

  end function str_string_matrix

end module

Hi tow21,

Thank you for the report. I have added a technical problem report, TPR#3897, and have pass this code to our compiler. Unfortunately they have not yet been able to find a suitable work around sans commenting out line 39, "s = str_string_array(reshape(st,(/size(st)/))) ".

  • Mat