Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29253 Discussions

Strange warning with ifort 13.0.0.079

MR
Beginner
648 Views

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.  
 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

0 Kudos
4 Replies
Anonymous66
Valued Contributor I
648 Views
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.
0 Kudos
MR
Beginner
648 Views
Annalee, OK, thank you. Marco Restelli
0 Kudos
Anonymous66
Valued Contributor I
648 Views
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
0 Kudos
Ron_Green
Moderator
648 Views

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

ron

0 Kudos
Reply