Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

ICE + question about realloc_lhs

MR
Beginner
347 Views
Dear group,
the following code produces an ICE when compiled with
ifort -assume realloc_lhs test_all.f90 -o test_all

In addition, I would like to ask you if such a code is supposed to
work with the new "reallocate on assignment" f2003 feature or not. The
point is, in this example the rhs is a function returning an
allocatable array, rather than being a variable.

Thank you,
Marco Restelli


ifort -assume realloc_lhs test_all.f90 -o test_all
0_11517

fortcom: Severe: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.

compilation aborted for test_all.f90 (code 3)

ifort -V
Intel Fortran Compiler for applications running on Intel 64, Version 10.1 Build 20080602



module my_mod

implicit none

contains

function my_fun(n) result(y)
integer, intent(in) :: n
real, allocatable :: y(:)

integer :: i

allocate(y(n))
y = (/ (real(i),i=1,n) /)

end function my_fun

end module my_mod


program test_all

use my_mod

implicit none

real, allocatable :: ps(:)

!allocate(ps(4))
ps = my_fun(4)

write(*,*) ps

end program test_all


0 Kudos
1 Reply
Steven_L_Intel1
Employee
347 Views
This is an problem we're already working on - our issue number is 47419.
0 Kudos
Reply