------- Comment #8 from jakub at gcc dot gnu dot org  2009-04-23 14:51 -------
A different testcase that segfaults even a little bit earlier:
subroutine test()
  interface
    function f()
      character(len=1) :: f(5)
    end function f
  end interface
  write (*, f()) 1
end subroutine test

Here upon entry to gfc_convert_array_to_string e->ref == NULL, so it crashes
already in that function.
If the array is packed, guess all we want is compute the address of its first
element and its SIZEOF (could we use the SIZEOF intrinsic expansion for that)?
If it is not packed, I'm afraid we need to pack it and then do what we do for
packed arrays.


-- 


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

Reply via email to