Strange warning with ifort 13.0.0.079

Strange warning with ifort 13.0.0.079

The attached code used to compile fine with older versions of ifort,
but moving to the new version 13.0.0.079 I see the following warning,
when compiling with -stand f03:

ifort -c -stand f03 moda.f90
moda.f90(16): warning #7363: Standard F2003 does not allow a dummy argument to a pure function to be used in a variable definition context.   [X]
 pure function f1d(x) result(y)
-------------------^

My impression is that the code is fine; even in case there is
something nonstandard in my call using the generic name, the warning
message seems rather obscure to me.

Thank you for any help,
   Marco Restelli

module moda
 implicit none
 interface f
   module procedure fs, f1d
 end interface

contains

 pure function fs(x) result(y)
  real, intent(in) :: x
  real :: y
   y = 2.0*x
 end function fs

 pure function f1d(x) result(y)
  real, intent(in) :: x(:)
  real :: y(size(x))
  integer :: i
   do i=1,size(x)
     y(i) = f(x(i)) ! triggers the warning
     !y(i) = fs(x(i)) ! does not trigger the warning
   enddo
 end function f1d
end module moda

5 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

The compiler is improperly assuming that x is modified to in the call to the generic function f.

I have escalated this issue to the developers. The issue number is DPD200237067. I will post any updates on the issue to this thread.

Annalee, OK, thank you.

Marco Restelli

A fix has been found for this issue. We are currently planning to include it in the next major release which is scheduled for sometime next year.

Regards,
Annalee

imagem de Ronald W Green (Intel)

This bug was fixed in the recent Composer XE 2013 SP1 release, released in early September ( version 14.0 of the compiler )

ron

Faça login para deixar um comentário.