Problem accessing module name (possible compiler bug)

Problem accessing module name (possible compiler bug)


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

 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

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


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

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


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.


flying_hermes, Annalee, thank you for the indications!

flying_herme, Annalee, thank you for the updates.

Marco Restelli

Leave a Comment

Please sign in to add a comment. Not a member? Join today