- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"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

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page