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

error #6634

Ketson_Roberto
Beginner
943 Views

Dear all,

What do you think thac causes this following error:

error #6634: The shape matching rules of actual arguments and dummy arguments have been violated.   

Thank you all!

 

0 Kudos
3 Replies
Lorri_M_Intel
Employee
943 Views

Hi Ketson -

             In Fortran 77 it was not unusual to pass arrays to subroutines using mismatched number of dimensions.  For example, you might pass a two-dimensional array to a routine that accepts a one-dimensional array.   And, by virtue of argument association, this would work, even if it's not the cleanest way to code your program.

           I'm guessing that you have /warn:interfaces enabled, which will check for this disconnect.

                           --Lorri

 

0 Kudos
Ketson_Roberto
Beginner
943 Views

Thank you Lorri, 

Moreover, I have  /warn:interfaces enabled! 

 

0 Kudos
Steven_L_Intel1
Employee
943 Views

If this is indeed the case, the correct way to do this is to pass the first element of the array, for example A(1,1) - this is "sequence association" and will suppress the error check.

I will comment that it is more helpful if you post the code in question rather than just the error message. If it's a call, include the declarations of the arguments in the call and the declaration of the called routine and its arguments.

0 Kudos
Reply