http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60593

--- Comment #2 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
Here's a reduced testcase that appears to lead to
the same ICE without the ISO C binding detour.

function C2FChar(j, s) result(res)
   implicit none
   integer, intent(in) :: j
   character(len=:), pointer, intent(in) :: s
   character(len=:), allocatable :: res
   character(len=1), pointer :: sp
   integer i
   sp => s
   allocate(character(j) :: res)
   forall (i = 1:j) res(i:i) = sp(i:i)
end function

Reply via email to