|
|
1.1 root 1: c comment section
2: c
3: c fm003
4: c
5: c this routine contains the basic continue tests. these tests
6: c ensure that execution of a continue statement causes continuation
7: c of the normal program execution sequence. only the statements in
8: c the basic assumptions are included in these tests. other continue
9: c tests are contained in other routines as part of the tests for
10: c other language features such as the do statements tests.
11: c
12: c references
13: c american national standard programming language fortran,
14: c x3.9-1978
15: c
16: c section 3.6, normal execution sequence and transfer of control
17: c section 11.11, continue statement
18: c
19: c
20: c **********************************************************
21: c
22: c a compiler validation system for the fortran language
23: c based on specifications as defined in american national standard
24: c programming language fortran x3.9-1978, has been developed by the
25: c federal cobol compiler testing service. the fortran compiler
26: c validation system (fcvs) consists of audit routines, their related
27: c data, and an executive system. each audit routine is a fortran
28: c program, subprogram or function which includes tests of specific
29: c language elements and supporting procedures indicating the result
30: c of executing these tests.
31: c
32: c this particular program/subprogram/function contains features
33: c found only in the subset as defined in x3.9-1978.
34: c
35: c suggestions and comments should be forwarded to -
36: c
37: c department of the navy
38: c federal cobol compiler testing service
39: c washington, d.c. 20376
40: c
41: c **********************************************************
42: c
43: c
44: c
45: c initialization section
46: c
47: c initialize constants
48: c **************
49: c i01 contains the logical unit number for the card reader.
50: i01 = 5
51: c i02 contains the logical unit number for the printer.
52: i02 = 6
53: c system environment section
54: c
55: cx010 this card is replaced by contents of fexec x-010 control card.
56: c the cx010 card is for overriding the program default i01 = 5
57: c (unit number for card reader).
58: cx011 this card is replaced by contents of fexec x-011 control card.
59: c the cx011 card is for systems which require additional
60: c fortran statements for files associated with cx010 above.
61: c
62: cx020 this card is replaced by contents of fexec x-020 control card.
63: c the cx020 card is for overriding the program default i02 = 6
64: c (unit number for printer).
65: cx021 this card is replaced by contents of fexec x-021 control card.
66: c the cx021 card is for systems which require additional
67: c fortran statements for files associated with cx020 above.
68: c
69: ivpass=0
70: ivfail=0
71: ivdele=0
72: iczero=0
73: c
74: c write page headers
75: write (i02,90000)
76: write (i02,90001)
77: write (i02,90002)
78: write (i02, 90002)
79: write (i02,90003)
80: write (i02,90002)
81: write (i02,90004)
82: write (i02,90002)
83: write (i02,90011)
84: write (i02,90002)
85: write (i02,90002)
86: write (i02,90005)
87: write (i02,90006)
88: write (i02,90002)
89: 131 continue
90: ivtnum = 13
91: c
92: c **** test 013 ****
93: c test 13 - continue test
94: c continue statement following integer assignment
95: c statements.
96: c
97: if (iczero) 30130, 130, 30130
98: 130 continue
99: ivon01=5
100: ivon02=6
101: continue
102: go to 40130
103: 30130 ivdele = ivdele + 1
104: write (i02,80003) ivtnum
105: if (iczero) 40130, 141, 40130
106: 40130 if (ivon01-5) 20131,40131,20131
107: 40131 if (ivon02-6) 20132,10130,20132
108: 10130 ivpass = ivpass + 1
109: write (i02,80001) ivtnum
110: go to 141
111: 20131 ivcomp=ivon01
112: ivcorr=5
113: go to 20130
114: 20132 ivcomp=ivon02
115: ivcorr=6
116: 20130 ivfail = ivfail + 1
117: write (i02,80004) ivtnum, ivcomp ,ivcorr
118: 141 continue
119: ivtnum = 14
120: c
121: c **** test 014 ****
122: c test 14 - continue test
123: c continue statement between integer assignment
124: c statements
125: c
126: if (iczero) 30140, 140, 30140
127: 140 continue
128: ivon01=14
129: continue
130: ivon02=15
131: go to 40140
132: 30140 ivdele = ivdele + 1
133: write (i02,80003) ivtnum
134: if (iczero) 40140, 151, 40140
135: 40140 if (ivon01 - 14) 20141,40141,20141
136: 40141 if (ivon02 - 15) 20142, 10140, 20142
137: 10140 ivpass = ivpass + 1
138: write (i02,80001) ivtnum
139: go to 151
140: 20141 ivcomp=ivon01
141: ivcorr=14
142: go to 20140
143: 20142 ivcomp=ivon02
144: ivcorr=15
145: 20140 ivfail = ivfail + 1
146: write (i02,80004) ivtnum, ivcomp ,ivcorr
147: 151 continue
148: ivtnum = 15
149: c
150: c **** test 015 ****
151: c test 15 - continue test
152: c two consecutive continue statements
153: c
154: if (iczero) 30150, 150, 30150
155: 150 continue
156: continue
157: ivon01=19
158: ivon02=20
159: go to 40150
160: 30150 ivdele = ivdele + 1
161: write (i02,80003) ivtnum
162: if (iczero) 40150, 161, 40150
163: 40150 if (ivon01 - 19) 20151,40151,20151
164: 40151 if (ivon02 -20) 20152,10150,20152
165: 10150 ivpass = ivpass + 1
166: write (i02,80001) ivtnum
167: go to 161
168: 20151 ivcomp=ivon01
169: ivcorr=19
170: go to 20150
171: 20152 ivcomp=ivon02
172: ivcorr=20
173: 20150 ivfail = ivfail + 1
174: write (i02,80004) ivtnum, ivcomp ,ivcorr
175: 161 continue
176: ivtnum = 16
177: c
178: c **** test 016 ****
179: c test 16 - continue test
180: c branch to continue statement from if statement
181: c
182: if (iczero) 30160, 160, 30160
183: 160 continue
184: ivon01=16
185: if (ivon01 - 16) 162,163,162
186: 162 ivcorr=16
187: go to 20160
188: 163 continue
189: ivon01=160
190: go to 40160
191: 30160 ivdele = ivdele + 1
192: write (i02,80003) ivtnum
193: if (iczero) 40160, 171, 40160
194: 40160 if (ivon01-160) 20161,10160,20161
195: 10160 ivpass = ivpass + 1
196: write (i02,80001) ivtnum
197: go to 171
198: 20161 ivcorr=160
199: 20160 ivfail = ivfail + 1
200: ivcomp=ivon01
201: write (i02,80004) ivtnum, ivcomp ,ivcorr
202: 171 continue
203: ivtnum = 17
204: c
205: c **** test 017 ****
206: c test 17 - continue test
207: c two of the branches of an if statement are to the same
208: c continue statement. the third branch also is made to
209: c a continue statement.
210: c
211: if (iczero) 30170, 170, 30170
212: 170 continue
213: ivon01=17
214: if (ivon01-19) 173,172,172
215: 172 continue
216: ivcorr=17
217: go to 20170
218: 173 continue
219: ivon01=170
220: go to 40170
221: 30170 ivdele = ivdele + 1
222: write (i02,80003) ivtnum
223: if (iczero) 40170, 181, 40170
224: 40170 if (ivon01 - 170) 20171,10170,20171
225: 10170 ivpass = ivpass + 1
226: write (i02,80001) ivtnum
227: go to 181
228: 20171 ivcorr=170
229: 20170 ivfail = ivfail + 1
230: ivcomp=ivon01
231: write (i02,80004) ivtnum, ivcomp ,ivcorr
232: 181 continue
233: ivtnum = 18
234: c
235: c **** test 018 ****
236: c test 18 - continue test
237: c branch to continue statement from go to statement
238: c
239: if (iczero) 30180, 180, 30180
240: 180 continue
241: if (iczero) 184,182,184
242: 182 ivon01=18
243: go to 183
244: 184 ivon01=20
245: 183 continue
246: ivon02=180
247: go to 40180
248: 30180 ivdele = ivdele + 1
249: write (i02,80003) ivtnum
250: if (iczero) 40180, 191, 40180
251: 40180 if (ivon01 - 18) 20181,40181,20181
252: 40181 if (ivon02 -180) 20182,10180,20182
253: 10180 ivpass = ivpass + 1
254: write (i02,80001) ivtnum
255: go to 191
256: 20181 ivcorr=18
257: ivcomp=ivon01
258: go to 20180
259: 20182 ivcomp=ivon02
260: ivcorr=180
261: 20180 ivfail = ivfail + 1
262: write (i02,80004) ivtnum, ivcomp ,ivcorr
263: 191 continue
264: ivtnum = 19
265: c
266: c **** test 019 ****
267: c test 19 - continue test
268: c branch to three continue statements from if statement.
269: c continue statements follow each other.
270: c
271: if (iczero) 30190, 190, 30190
272: 190 continue
273: icone = 1
274: if (icone) 194,192,193
275: 193 continue
276: 192 continue
277: 194 continue
278: ivon01=19
279: go to 40190
280: 30190 ivdele = ivdele + 1
281: write (i02,80003) ivtnum
282: if (iczero) 40190, 201, 40190
283: 40190 if (ivon01 - 19) 20190,10190,20190
284: 10190 ivpass = ivpass + 1
285: write (i02,80001) ivtnum
286: go to 201
287: 20190 ivfail = ivfail + 1
288: ivcomp=ivon01
289: ivcorr=19
290: write (i02,80004) ivtnum, ivcomp ,ivcorr
291: 201 continue
292: ivtnum = 20
293: c
294: c **** test 020 ****
295: c test 20 - continue test
296: c three separate branches of an if statement are to
297: c continue statements.
298: c
299: if (iczero) 30200, 200, 30200
300: 200 continue
301: icon02=-2
302: if (icon02) 204,202,203
303: 203 continue
304: ivon01=203
305: go to 40200
306: 204 continue
307: ivon01 = 204
308: go to 40200
309: 202 continue
310: ivon01=202
311: go to 40200
312: 30200 ivdele = ivdele + 1
313: write (i02,80003) ivtnum
314: if (iczero) 40200, 211, 40200
315: 40200 if (ivon01 - 204) 20200,10200,20200
316: 10200 ivpass = ivpass + 1
317: write (i02,80001) ivtnum
318: go to 211
319: 20200 ivfail = ivfail + 1
320: ivcomp=ivon01
321: ivcorr=204
322: write (i02,80004) ivtnum, ivcomp ,ivcorr
323: 211 continue
324: c
325: c write page footings and run summaries
326: 99999 continue
327: write (i02,90002)
328: write (i02,90006)
329: write (i02,90002)
330: write (i02,90002)
331: write (i02,90007)
332: write (i02,90002)
333: write (i02,90008) ivfail
334: write (i02,90009) ivpass
335: write (i02,90010) ivdele
336: c
337: c
338: c terminate routine execution
339: stop
340: c
341: c format statements for page headers
342: 90000 format (1h1)
343: 90002 format (1h )
344: 90001 format (1h ,10x,34hfortran compiler validation system)
345: 90003 format (1h ,21x,11hversion 1.0)
346: 90004 format (1h ,10x,38hfor official use only - copyright 1978)
347: 90005 format (1h ,5x,4htest,5x,9hpass/fail, 5x,8hcomputed,8x,7hcorrect)
348: 90006 format (1h ,5x,46h----------------------------------------------)
349: 90011 format (1h ,18x,17hsubset level test)
350: c
351: c format statements for run summaries
352: 90008 format (1h ,15x,i5,19h errors encountered)
353: 90009 format (1h ,15x,i5,13h tests passed)
354: 90010 format (1h ,15x,i5,14h tests deleted)
355: c
356: c format statements for test results
357: 80001 format (1h ,4x,i5,7x,4hpass)
358: 80002 format (1h ,4x,i5,7x,4hfail)
359: 80003 format (1h ,4x,i5,7x,7hdeleted)
360: 80004 format (1h ,4x,i5,7x,4hfail,10x,i6,9x,i6)
361: 80005 format (1h ,4x,i5,7x,4hfail,4x,e12.5,3x,e12.5)
362: c
363: 90007 format (1h ,20x,20hend of program fm003)
364: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.