ICE: size_of: attempt to get size of assumed size character

This example triggers an internal compiler error with 18.4.

subroutine sub(array)
  character(*), intent(in) :: array(:)
  class(*), allocatable :: copy(:)
  allocate(copy, source=array)
end



$ pgfortran -c pgi-20180505c.f90
PGF90-S-0000-Internal compiler error. size_of: attempt to get size of assumed size character 0 (pgi-20180505c.f90: 4)
0 inform, 0 warnings, 1 severes, 0 fatal for sub

Hi NeilC,

I was able to reproduce this issue here and have created TPR#25697 and sent to engineering for further investigation.

Thanks!
Mat