Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29276 Discussions

Help file more up to date than compiler

Andrew_Smith
Valued Contributor I
591 Views

The latest help says a type bound procedure can have the [NON]OVERRIDABLE attribute but it gives a compiler error.

[fortran]module ParentType
   implicit none
   type AType
      contains
         procedure, NONOVERRIDABLE :: doSomething
   end type
contains
   subroutine doSomething(item)
      class(AType), intent(inout) :: item
   end subroutine
end module
[/fortran]

Compiling with Intel(R) Visual Fortran Compiler XE 14.0.1.139 [IA-32]...

Console1.f90

D:\temp\Console1\Console1\Console1.f90(6): error #8172: This is not a valid attribute for the procedure component definition statement. [NONOVERRIDABLE]

compilation aborted for D:\temp\Console1\Console1\Console1.f90 (code 1)

3 Replies
IanH
Honored Contributor III
591 Views

Looks like a "spelling" mistake in the documentation.  The keyword is NON_OVERRIDABLE.  There's no OVERRIDABLE keyword.

FortranFan
Honored Contributor III
591 Views

It's clearly a typo in Intel's help system.   

NON_OVERRIDABLE is the right option; and as Ian mentioned, OVERRIDABLE is not a valid keyword.

When in doubt, refer to Fortran 2003 and 2008 standards documentation.

NON_OVERRIDABLE is indeed available in Intel Fortran compiler; I've been using it extensively for a while now.

Steven_L_Intel1
Employee
591 Views

I'll have this corrected in the documentation.  Thanks for calling it to our attention.

Reply