FTNCHEK Version 3.3 November 2004 File common-alias.f: 1 C Test program for checking aliasing of arguments to common variables 2 C 3 COMMON Q,F,X 4 COMMON /BLK1/ DAT(100) 5 W = 1.0 6 X = 2.0 7 Z = 4.0 8 CALL FOO(W,X,Y,Z) 9 CALL FOO(F,W,Y,Z) 10 CALL FOO(W,Y,Q,Z) 11 PRINT *, W,X,Y,Z 12 CALL BAR(DAT,100) 13 STOP 14 END Module %MAIN: prog External subprograms referenced: BAR: subr FOO: subr Common blocks referenced: %BLANK BLK1 Variables: Name Type Dims Name Type Dims Name Type Dims Name Type Dims DAT real* 1 F real* Q real* W real* X real* Y real* Z real* * Variable not declared. Type has been implicitly defined. I/O Operations: Unit ID Unit No. Access Form Operation Line * SEQ FMTD PRINT 11 15 SUBROUTINE FOO(A,B,C,D) 16 COMMON T,U,V 17 B = A+C+D 18 T = B + 1.0 19 RETURN 20 END Module FOO: subr Common blocks referenced: %BLANK Variables: Name Type Dims Name Type Dims Name Type Dims Name Type Dims A real* B real* C real* D real* T real* U real* V real* * Variable not declared. Type has been implicitly defined. 21 SUBROUTINE BAR(D,N) 22 COMMON /BLK1/ TAD(100) 23 REAL D(N) 24 DO 10 I=1,N-1 25 TAD(I) = I 26 D(I) = TAD(I)*2.0 27 10 CONTINUE 28 END Module BAR: subr Common blocks referenced: BLK1 Variables: Name Type Dims Name Type Dims Name Type Dims Name Type Dims D real 1 I intg* N intg* TAD real* 1 * Variable not declared. Type has been implicitly defined. Statement labels defined: Label Line StmtType <10> 27 exec 0 syntax errors detected in file common-alias.f 3 warnings issued in file common-alias.f Warning: Subprogram FOO argument usage mismatch at position 2: Dummy arg B in module FOO line 15 file common-alias.f is aliased to common var 3: V in block %BLANK Dummy arg B in module FOO line 15 file common-alias.f is modified Actual arg X in module %MAIN line 8 file common-alias.f is in common block %BLANK and at position 3: Dummy arg C in module FOO line 15 file common-alias.f is used before set Actual arg Y in module %MAIN line 8 file common-alias.f is not set Warning: Subprogram FOO argument usage mismatch at position 3: Dummy arg C in module FOO line 15 file common-alias.f is aliased to common var 1: T in block %BLANK which is modified Actual arg Q in module %MAIN line 10 file common-alias.f is in common block %BLANK Warning: Subprogram BAR argument usage mismatch at position 1: Dummy arg D in module BAR line 21 file common-alias.f is aliased to common var 1: TAD in block BLK1 which is modified Dummy arg D in module BAR line 21 file common-alias.f is modified Actual arg DAT in module %MAIN line 12 file common-alias.f is in common block BLK1