Strange warning with ifort 13.0.0.079

Strange warning with ifort 13.0.0.079

Аватар пользователя mrestelli@gmail.com

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

4 posts / 0 новое
Последнее сообщение
Пожалуйста, обратитесь к странице Уведомление об оптимизации для более подробной информации относительно производительности и оптимизации в программных продуктах компании Intel.
Аватар пользователя Annalee (Intel)

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.

Аватар пользователя mrestelli@gmail.com

Annalee, OK, thank you.

Marco Restelli

Аватар пользователя Annalee (Intel)

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

Зарегистрируйтесь, чтобы оставить комментарий.