https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103390

--- Comment #4 from sandra at gcc dot gnu.org ---
I thought I had a fix for this that involved making gfc_is_simply_contiguous
smarter about intrinsics and other function calls, but after writing more test
cases I found that this one still ICEs.

program p
   integer, pointer :: z(:)
   integer :: a(3) = [1, 2, 3];
   integer :: b(3) = [4, 5, 6];
   call s(a + b);
contains
   subroutine s(x) bind(c)
      integer, contiguous :: x(:)
   end
end

Tobias's other suggestion to me was gating the copy-out code with
gfc_expr_is_variable() so I'll try that next.

Reply via email to