Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Strange warning with ifort 13.0.0.079

MR
初学者
692 次查看

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 项奖励
4 回复数
Anonymous66
重要分销商 I
692 次查看
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 项奖励
MR
初学者
692 次查看
Annalee, OK, thank you. Marco Restelli
0 项奖励
Anonymous66
重要分销商 I
692 次查看
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 项奖励
Ron_Green
主持人
692 次查看

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

ron

0 项奖励
回复