Problem accessing module name (possible compiler bug)

Problem accessing module name (possible compiler bug)

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

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

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.

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

Annalee

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

flying_hermes, Annalee, thank you for the indications!

flying_herme, Annalee, thank you for the updates.

Marco Restelli

Kommentar hinterlassen

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