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

Compilation error with function pointer argument in submodule

Wolf_W_
New Contributor I
460 Views

Hello,

i get a compilation error with this code:

module M_TEST

  interface
    module subroutine foo(fun_ptr)
      procedure(), pointer, intent(out) :: fun_ptr
    end subroutine
  end interface

end module


submodule (M_TEST) S_TEST

contains

  module subroutine foo(fun_ptr) ! <= Error in this line
    procedure(), pointer, intent(out) :: fun_ptr
  end subroutine

end submodule

It shows: error #7257: The characteristics of the procedure argument differ from those specified in the separate interface body. This happens with the Intel Fortran Compiler 17.4 for Linux. It works as intended with the 17.4 windows compiler.

Greetings

Wolf

 

0 Kudos
0 Replies
Reply