Welcome to Intel® Software Network Quick Login | Join | Help |
Search in Intel® Software Network Forums
in Go

ifort 9.1.036 and -check all

Last post 05-12-2008, 6:09 AM by Steve Lionel. 5 replies.
Sort Posts: Previous Next
 09-06-2006, 7:21 AM 30223437  

ifort 9.1.036 and -check all

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.
 
 09-06-2006, 1:58 PM 30223461 in reply to 30223437  

Re: ifort 9.1.036 and -check all

The new version implements a new run-time check, -check pointer,  which complains when you try to fetch from an unallocated pointer.  For some reason, it is doing this check for the allocated call when it isn't supposed to - that's a bug and I'll send it to the developers. When you use -check all, you get -check pointer.



Steve

Doctor Fortran: intel.com/software/drfortran
 
 09-06-2006, 3:40 PM 30223469 in reply to 30223461  

Re: ifort 9.1.036 and -check all

Thank you Steve.

The html documentation needs to be updated, there's no -check pointer in the check section.
 
 09-06-2006, 4:12 PM 30223476 in reply to 30223469  

Re: ifort 9.1.036 and -check all

We don't update the documentation except at full releases. Please refer to the Release Notes for changes in updates.

Steve

Doctor Fortran: intel.com/software/drfortran
 
 05-11-2008, 9:54 AM 30254563 in reply to 30223461  

Re: ifort 9.1.036 and -check all


Hi Doc Fortran

I have found a bug which I think is an expression of the one you describe here... Using check all with allocatable defined types causes problems if the defined types have initialized values.

The problem only occurs on our intel 9.1.X install:
Intel(R) Fortran Compiler for Intel(R) EM64T-based applications, Version 9.1 Build 20061101 Package ID: l_fc_c_9.1.040

It seems to be fixed in:
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 10.1    Build 20071116 Package ID: l_fc_p_10.1.011

Can you help me find out if this issue is resolved in all versions of V 10.1.X ? I want to know if the ROCKS INTEL DEVELOPER roll has this bug?

Please see attached code for an example.

Thanks
David


!Compile with: ifort -check all
module types
implicit none

type stupid
integer :: pqr = 2
end type stupid


contains

subroutine does_this
implicit none
type(stupid), allocatable :: test(:)

write(6,*) 'does_this'

end subroutine does_this

end module types


program main
use types
implicit none
! this is okay?
! type(stupid), allocatable :: test(:)

write(6,*) 'running: '
! this is not okay
call does_this

end program main

 
 05-12-2008, 6:09 AM 30254608 in reply to 30254563  

Re: ifort 9.1.036 and -check all

As far as I know, it is fixed in all 10.1 versions. I'd be surprised if any current ROCKS roll includes the old 9.1 compiler.

Steve

Doctor Fortran: intel.com/software/drfortran
 
View as RSS news feed in XML

Shortcuts


Tags For This Post

...

Community Tags

...