Hi,
I updated ifort from a 9.0 version (I don't remember exactly the version) to 9.1.036 on linux.
To compile my code, among other flags I use -check all and there was no problem before updating ifort.
With the new ifort version, the code no longer works. The symptoms could be shown with this little code :
module m_test
implicit none
type t_test
real*8, allocatable :: coef(:)
end type t_test
public :: f_test, t_test
contains
function f_test() result(t)
type(t_test) :: t
print*,isalloc(t%coef)
print*,allocated( t%coef )
allocate( t%coef(1) )
t%coef = 0.D0
end function f_test
logical function isalloc(t)
real*8, allocatable, intent(inout) :: t(:)
isalloc = allocated(t)
end function isalloc
end module m_test
program test
use m_test
implicit none
type(t_test) :: t
t = f_test( )
end program test
Compiling this with -check all will output :
F
forrtl: severe (408): fort: (8): Attempt to fetch from allocatable variable COEF when it is not allocated
Besides, I tried each -check flags separately, and for all of them the code works. Moreover, it works if I use all -check flags together :
-check bounds -check format -check arg_temp_created -check uninit -check output_conversion
Isn't -check all supposed to be the sum of all individual -check flags ?
Why using isalloc works and not allocated() ?
Where is the problem ? code or compiler ?
Thanks a lot.