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

ABSTRACT INTERFACE

John4
Valued Contributor I
666 Views

Hi,

When I try to compile the code below, I get an error that says that the specified interface is not declared. Is this a bug or am I doing something wrong?

Thanks!

module mod1

abstract interface
subroutine sub1(data1)
integer, intent(INOUT) :: data1
end subroutine
end interface

contains
subroutine sub2(data1, proc)
integer, intent(INOUT) :: data1
procedure(sub1), optional :: proc

if (PRESENT(proc)) call proc(data1)
end subroutine

end module mod1
0 Kudos
1 Solution
Steven_L_Intel1
Employee
666 Views
Compiler bug. It's already fixed for a future release.

View solution in original post

0 Kudos
1 Reply
Steven_L_Intel1
Employee
667 Views
Compiler bug. It's already fixed for a future release.
0 Kudos
Reply