Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

need help with compile error

Brian_Murphy
New Contributor II
69 Views

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
mecej4
Black Belt
69 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.

Brian_Murphy
New Contributor II
69 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

Reply