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

Problem accessing module name (possible compiler bug)

MR
Beginner
429 Views

Hi,

the latest ifort version can not compile the attached code, which seems correct to me (and which used to compile with older versions and with gfortran).

ifort a.f90 -o a
a.f90(17): error #6580: Name in only-list does not exist.   [FF]
 use m, only: ff
--------------^
compilation aborted for a.f90 (code 1)

ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.1 Build 20130313

module m
 implicit none
 public :: ff
 private

 abstract interface
  function i_f(x) result(y)
   implicit none
   real, intent(in) :: x
   real :: y
  end function i_f
 end interface
 procedure(i_f), pointer :: ff => null()
end module m

program p
 use m, only: ff
end program p

0 Kudos
5 Replies
FlyingHermes
New Contributor I
429 Views

Hi,

I think it is indeed a compiler bug.

I try to add the "public" attribute directly in the declaration of the ff procedure pointer as follow

[fortranprocedure(i_f), pointer, public :: ff => null()[/fortran]

and it gives a compiler error:

ifort -c main.f90 -o main.o;  ifort main.o -o a.out
main.f90(15): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
 procedure(i_f), pointer, public :: ff => null()
^
[ Aborting due to internal error. ]

As you may have notice, a possible workaround is to remove the "private" statement.

0 Kudos
Anonymous66
Valued Contributor I
429 Views

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

Annalee

0 Kudos
Anonymous66
Valued Contributor I
429 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 later this year.

Annalee

0 Kudos
MR
Beginner
429 Views

flying_hermes, Annalee, thank you for the indications!

0 Kudos
MR
Beginner
429 Views

flying_herme, Annalee, thank you for the updates.

Marco Restelli

0 Kudos
Reply