- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have escalated this issue to the developers. The issue number is DPD200244054. I will post any updates I receive to this thread.
Annalee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page