[Bug fortran/69739] [4.9/5/6 Regression] ICE during array result, allocatable assignment
jwmwalrus at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 11 00:32:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69739
--- Comment #2 from John <jwmwalrus at gmail dot com> ---
After reporting the bug, I noticed that in the actual code I have (not the
reduced version I posted before), adding the (:) stride doesn't always make the
ICE go away.
What solved the problem once and for all (and without using the
-fno-realloc-lhs flag) was changing the result in the "operate" function to be
that of an allocatable array:
function operate(A, X)
type(sometype), intent(IN) :: A(:,:,:)
real, intent(IN) :: X(:)
! real :: operate(1:PRODUCT(UBOUND(A)))
real, allocatable :: operate(:)
allocate (operate(1:PRODUCT(UBOUND(A))))
operate(:) = 0
end function
So maybe the automatic-size result is the actual root of the ICE?
More information about the Gcc-bugs
mailing list