Strange warning with ifort

Strange warning with ifort

The attached code used to compile fine with older versions of ifort,
but moving to the new version 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


 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
 end function f1d
end module moda

5 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

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.


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


Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen