Problem accessing module name (possible compiler bug)

Problem accessing module name (possible compiler bug)

imagem de mrestelli@gmail.com

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 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de flying_hermes

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.

imagem de Annalee (Intel)

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

Annalee

imagem de Annalee (Intel)

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

imagem de mrestelli@gmail.com

flying_hermes, Annalee, thank you for the indications!

imagem de mrestelli@gmail.com

flying_herme, Annalee, thank you for the updates.

Marco Restelli

Faça login para deixar um comentário.