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

error in interface block

fdam2
Beginner
594 Views
The following code produces an error when compiled with IVF 9.

interface
subroutine get( a )
!dec$ attributes c:: get
integer,dimension(3),intent(out):: a
end subroutine get
end interface

Error: The INTENT(OUT) or INTENT(INOUT) attribute is not allowed for arguments received by value.

To me this seems incorrect because arrays are always passed by reference, irrespective of the calling convention.
The problem can be overcome by adding the following line:

!dec$ attributes reference :: a

0 Kudos
1 Reply
Steven_L_Intel1
Employee
594 Views
That was a bug fixed in a later update. 9.1.028 is current.
0 Kudos
Reply