1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
FTNCHEK Version 3.1 May 2001
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.
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
|