I get this error when compiling on Windows when passing string arguments to a subroutine. The arguments have different length so the compiler generates this error.
I saw a previous post and used the -Munix parameter which fixed the problem. Surely, however, the compiler does not adhere to the standard since this is a very common use of string arguments?
And what happens when arguments are passed from routines which use this subroutine from other libraries. Will it work correctly ? Or do I have to compile every routine with the -Munix parameter.
What other side-effects of using this are there?
Can you please post an example of the callee and caller, including any interfaces?
The Win32 default calling convention appends the size of the data types in the argument list to the symbol name. So if you have a data type mismatch, then this could cause the above error. “-Munix” tells the compiler to use the UNIX style calling convention which does not use the argument list data type size. See the “Win32 Calling Conventions” section at the end of Chapter 11 of th PGI User’s Guide for more details.
However, the size of a character array shouldn’t matter in this context since what’s really being passed is a reference to the character array, not the whole array. Hence, the number appended to the end of the symbol name is the size of a pointer, not the size of an array. You can try using “-Munix”, but I don’t think that’s the issue here. An example would be very helpful.
I have fixed the problem (mine) and it wasn’t related to the size of the character variables - thanks for your response.