- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It seems that there is a bug with GENERIC implementation for type-bound procedure. I am trying out the latest Intel Fortran Compiler on linux. When calling a GENERIC subroutine (with type-bound procedure) with Keyword argument, the compiler complains that I don't have an explicit interface, although the subroutine is in a module. Here is a test case.
Suppose I have the module file: VG_Mofule.f90:
And the corresponding test program: VG_Test.f90
If I compile these, I get:
It seems that there is a bug with GENERIC implementation for type-bound procedure. I am trying out the latest Intel Fortran Compiler on linux. When calling a GENERIC subroutine (with type-bound procedure) with Keyword argument, the compiler complains that I don't have an explicit interface, although the subroutine is in a module. Here is a test case.
Suppose I have the module file: VG_Mofule.f90:
[fortran]module VG_Module implicit none private type, public :: VGForm integer :: dummy contains procedure, pass :: I_Alloc procedure, pass :: I_Assoc generic :: Init => I_Alloc, I_Assoc end type VGForm contains subroutine I_Alloc ( VG, V, ClearOption ) class ( VGForm ), intent ( inout ) :: VG integer, intent ( in ) :: V logical, intent ( in ), optional :: ClearOption print*, 'I_Alloc subroutine', V if ( present ( ClearOption ) ) print*, 'Is Clear?', ClearOption end subroutine I_Alloc subroutine I_Assoc ( VG, V, ClearOption ) class ( VGForm ), intent ( inout ) :: VG real, dimension ( : ), intent ( in ), target :: V logical, intent ( in ), optional :: ClearOption print*, 'I_Assoc subroutine', V if ( present ( ClearOption ) ) print*, 'Is Clear?', ClearOption end subroutine I_Assoc end module VG_Module [/fortran]
And the corresponding test program: VG_Test.f90
[fortran]program VG_Test use VG_Module implicit none type ( VGForm ) :: VG_1, VG_2, VG_3, VG_4 call VG_1 % Init ( 1 ) call VG_2 % Init ( [ 3., 4., 5.] ) call VG_3 % Init ( 3, ClearOption = .true. ) !-- This call produces error call VG_4 % I_Alloc ( 4, ClearOption = .true. ) end program VG_Test[/fortran]
If I compile these, I get:
[bash]$ ifort -c VG_Module.f90 $ ifort -o VG_Test VG_Test.f90 VG_Module.o VG_Test.f90(13): error #6632: Keyword arguments are invalid without an explicit interface. [CLEAROPTION] call VG_3 % Init ( 3, ClearOption = .true. ) !-- This call produces error ------------------------^ compilation aborted for VG_Test.f90 (code 1) $ ifort -V Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.0 Build 20110309 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. [/bash]These files compile without error with the latest gfortran and Cray fortran compiler.
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - this is a problem that our developers are already working on. The issue ID is DPD200166645.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This will be fixed in a future version of the compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The latest release (2011.4.191) still has this isse :(. Any ETA for the fix ?
$>ifort -V
Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.0 Build 20110427
Thanks
$>ifort -V
Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.0 Build 20110427
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It will be some months out. Sorry for the inconvenience, but it was a complex fix which requires more testing than what normally goes into an update. If this is seriously impacting you, let me know and we may be able to help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
What is the status of this bug ?
It seems to be still present in ifort version 13.1.1.
Am I right ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The bug reported in the original posting is fixed - it compiles fine with 13.1.1. You may have a source that gets the same error message for a different cause. Please provide an example that shows the problem you're seeing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By reducing the code that produced an erronious output, I've found that the error was indeed not related to the bug descibed in the current post.
I've created a new topic, "Bug using an array of derived-type with an polymorphic component" (http://software.intel.com/en-us/forums/topic/392803)
![](/skins/images/06022F5BB6D2F28C8F102671A0F06E85/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page