I have a very large, vendor-supplied FORTRAN program that uses a REAL array to hold character strings that are passed back and forth between routines.
VSF 6.6B compiler/linker gives me weird behavior depending on whether the subrotines are in the same source file or different source files. I have created a simple test source below to show the problems:
(1) If the subroutines are together in the same source file, I get an extraneous warning message:
Warning: Routine GETCHARACTER called with different number and/or type of actual arguments in earlier call - C attribute required if intended. Call GetCharacter(XS)
Otherwise the source compiles, links and runs fine.
(2) If the subroutines are in separate source files, the code will not link:
error LNK2001: unresolved external symbol _GETCHARACTER@4
Here is my simple source example you can try in the same file and then separate files.
Write(*,*) 'XS= ',XS
DO I = 1, 10
WRITE(*,*) 'AXS(I)= ',AXS(I)