Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
9 Views

need help with compile error

The attached fortran source file is from the NIST.  I get the following compile error, and I can't figure out why.

Error 5  error #6634: The shape matching rules of actual arguments and dummy arguments have been violated.    F12854_stpv2a.for 2166 

It appears that array F is dimensioned F(20) and passed to a routine where it is declared F(*).  It that supposed to trigger this compile error?  I wanted to ask about this before turning off /warn:interfaces which gets rid of the error.

0 Kudos
2 Replies
Highlighted
Black Belt
9 Views

Your diagnosis is off the mark. It is the second argument of ENTRY STAT, namely, Y, that is mismatched. The dummy argument is a double precision scalar, whereas the actual argument F in Line-2166 is a double precision array. In old sloppy Fortran, the expectation was that only F(1) would be used as the actual argument for the dummy Y, but the Fortran Standard does not support this usage.

0 Kudos
Highlighted
New Contributor I
9 Views

"Ahhh.  I see!".  Said the blind man.

I missed the switcheroo in variable names.  The error makes more sense to me now.  I think it is a good idea the compiler flagged this.

Cheers,

Brian

0 Kudos