|
|
1.1 ! root 1: c comment section. ! 2: c ! 3: c fm010 ! 4: c ! 5: c this routine tests reference format of fortran statements ! 6: c and statement numbers. the use of the blank character is tested ! 7: c both within the statement number field and within the fortran ! 8: c statements themselves. leading zero is tested for statements and ! 9: c integer constants. variable names which look very much like ! 10: c fortran reserved words are tested in arithmetic assignment ! 11: c statements. naming conventions used throughout the fcvs are ! 12: c tested also in arithmetic assignment statements. ! 13: c ! 14: c references ! 15: c american national standard programming language fortran, ! 16: c x3.9-1978 ! 17: c ! 18: c section 2.5, variables ! 19: c section 3.1.6, blank character ! 20: c section 3.2.2, initial lines ! 21: c section 3.4, statement labels ! 22: c ! 23: c ! 24: c ********************************************************** ! 25: c ! 26: c a compiler validation system for the fortran language ! 27: c based on specifications as defined in american national standard ! 28: c programming language fortran x3.9-1978, has been developed by the ! 29: c federal cobol compiler testing service. the fortran compiler ! 30: c validation system (fcvs) consists of audit routines, their related ! 31: c data, and an executive system. each audit routine is a fortran ! 32: c program, subprogram or function which includes tests of specific ! 33: c language elements and supporting procedures indicating the result ! 34: c of executing these tests. ! 35: c ! 36: c this particular program/subprogram/function contains features ! 37: c found only in the subset as defined in x3.9-1978. ! 38: c ! 39: c suggestions and comments should be forwarded to - ! 40: c ! 41: c department of the navy ! 42: c federal cobol compiler testing service ! 43: c washington, d.c. 20376 ! 44: c ! 45: c ********************************************************** ! 46: c ! 47: c ! 48: c ! 49: c initialization section ! 50: c ! 51: c initialize constants ! 52: c ************** ! 53: c i01 contains the logical unit number for the card reader. ! 54: i01 = 5 ! 55: c i02 contains the logical unit number for the printer. ! 56: i02 = 6 ! 57: c system environment section ! 58: c ! 59: cx010 this card is replaced by contents of fexec x-010 control card. ! 60: c the cx010 card is for overriding the program default i01 = 5 ! 61: c (unit number for card reader). ! 62: cx011 this card is replaced by contents of fexec x-011 control card. ! 63: c the cx011 card is for systems which require additional ! 64: c fortran statements for files associated with cx010 above. ! 65: c ! 66: cx020 this card is replaced by contents of fexec x-020 control card. ! 67: c the cx020 card is for overriding the program default i02 = 6 ! 68: c (unit number for printer). ! 69: cx021 this card is replaced by contents of fexec x-021 control card. ! 70: c the cx021 card is for systems which require additional ! 71: c fortran statements for files associated with cx020 above. ! 72: c ! 73: ivpass=0 ! 74: ivfail=0 ! 75: ivdele=0 ! 76: iczero=0 ! 77: c ! 78: c write page headers ! 79: write (i02,90000) ! 80: write (i02,90001) ! 81: write (i02,90002) ! 82: write (i02, 90002) ! 83: write (i02,90003) ! 84: write (i02,90002) ! 85: write (i02,90004) ! 86: write (i02,90002) ! 87: write (i02,90011) ! 88: write (i02,90002) ! 89: write (i02,90002) ! 90: write (i02,90005) ! 91: write (i02,90006) ! 92: write (i02,90002) ! 93: 1001 continue ! 94: ivtnum = 100 ! 95: c ! 96: c **** test 100 **** ! 97: c ! 98: c test 100 - to check the various combinations of forming variable ! 99: c names. these are actually symbolic names (ansi x3.9-1978 ! 100: c section 2.2). this is basically a syntax check using a ! 101: c combination of from one to six alphanumeric characters with ! 102: c the first character always alphabetic. reference format is ! 103: c also checked by having each assignment statement an initial ! 104: c line (section 3.2.2). this means zero may appear in column ! 105: c six without effect, that lines may begin anywhere from ! 106: c column seven to column 72, and blanks may be used freely ! 107: c without meaning (3.1.6 blank characters). ! 108: c ! 109: if (iczero) 31000, 1000, 31000 ! 110: 1000 continue ! 111: a=1. ! 112: b =2. ! 113: c =3. ! 114: d =4. ! 115: e =5. ! 116: f =6. ! 117: 0g = 7. ! 118: h=8. ! 119: i=9 ! 120: j = 10 ! 121: k = 11 ! 122: l = 12 ! 123: 0m=13 ! 124: n=14 ! 125: o=15. ! 126: p=16. ! 127: q=17. ! 128: r=18. ! 129: s=19. ! 130: t=20. ! 131: u=21. ! 132: v=22. ! 133: w=23. ! 134: x=24. ! 135: y=25. ! 136: z=26. ! 137: aaaaaa=27. ! 138: bbbbb=28. ! 139: cccc=29. ! 140: ddd=30 ! 141: ee=31. ! 142: f0=32. ! 143: g12=33. ! 144: h345 = 34. ! 145: i6789 = 35 ! 146: j01234 = 36 ! 147: k 5 6 78 9=37 ! 148: l 2 l 2 l 2 =38 ! 149: m 3 m 3 m3 = 39 ! 150: n 40 = 4 0 ! 151: 0 omy = 4 1. ! 152: i pm h = 4 2 ! 153: go to 1 = 4 3. ! 154: if 3 = 44 ! 155: do 3 = 53. ! 156: call fl =62. ! 157: type i = 63. ! 158: true =71. ! 159: false = 72. ! 160: go to 41000 ! 161: 31000 ivdele = ivdele + 1 ! 162: write (i02,80003) ivtnum ! 163: if (iczero) 41000, 1011, 41000 ! 164: 41000 if (ipmh - 42) 21000,11000,21000 ! 165: 11000 ivpass = ivpass + 1 ! 166: write (i02,80001) ivtnum ! 167: go to 1011 ! 168: 21000 ivfail = ivfail + 1 ! 169: ivcomp = ipmh ! 170: ivcorr = 42 ! 171: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 172: 1011 continue ! 173: ivtnum = 101 ! 174: c ! 175: c **** test 101 **** ! 176: c test 101 - checks the fcvs naming conventions for integer and ! 177: c real variables in assignment statements: variable = constant ! 178: c basically a syntax check on six character variable names. ! 179: c ! 180: if (iczero) 31010, 1010, 31010 ! 181: 1010 continue ! 182: iace11 = 1 ! 183: iace21 = 2 ! 184: iace31 = 3 ! 185: iacn11 = 4 ! 186: iadn11 = 5 ! 187: iate31 = 6 ! 188: race11 = 7. ! 189: race21 = 8. ! 190: racn31 = 9. ! 191: rade31 = 10. ! 192: ivte69 = 11 ! 193: ivon78 = 12 ! 194: rvtnaz = 13. ! 195: rvoez9 = 14. ! 196: icte96 = 15 ! 197: icon84 = 16 ! 198: rcon48 = 17. ! 199: rcte54 = 18. ! 200: idony4 = 19 ! 201: idoeb6 = 20 ! 202: rdon46 = 21. ! 203: ifons3 = 22 ! 204: rfon77 = 23. ! 205: go to 41010 ! 206: 31010 ivdele = ivdele + 1 ! 207: write (i02,80003) ivtnum ! 208: if (iczero) 41010, 1021, 41010 ! 209: 41010 if (ivte69 - 11) 21010,11010,21010 ! 210: 11010 ivpass = ivpass + 1 ! 211: write (i02,80001) ivtnum ! 212: go to 1021 ! 213: 21010 ivfail = ivfail + 1 ! 214: ivcomp = ivte69 ! 215: ivcorr = 11 ! 216: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 217: 1021 continue ! 218: ivtnum = 102 ! 219: c ! 220: c **** test 102 **** ! 221: c test 102 - reference format check on statement labels (section ! 222: c 3.4). these are non-zero integers, from 1 to 5 digits, ! 223: c may begin anywhere from cols. 1 to 5, and leading zeros are ! 224: c not significant. blanks will be imbedded in some of the ! 225: c statement labels and these should have no effect. the ! 226: c continue statement (section 11.11) is used for this test. ! 227: c a basic fcvs assumption is that the logic will fall thru a ! 228: c series of continue statements (normal execution sequence). ! 229: c ! 230: if (iczero) 31020, 1020, 31020 ! 231: 1020 continue ! 232: 1 continue ! 233: 2 continue ! 234: 3 continue ! 235: 4 continue ! 236: 5 continue ! 237: 06 continue ! 238: 007 continue ! 239: 0008 continue ! 240: 00009 continue ! 241: 010 continue ! 242: 1 1 continue ! 243: 0 12 continue ! 244: 0 1 3 continue ! 245: 00 14 continue ! 246: 0 15 continue ! 247: 0 016 continue ! 248: 100 continue ! 249: 1 0 1 continue ! 250: 10 2 ivon01 = 1 ! 251: 1 03 continue ! 252: 1 04 continue ! 253: 01 05 continue ! 254: 010 6 continue ! 255: 0107 continue ! 256: 00108 continue ! 257: 1 1 1 continue ! 258: 1 111 continue ! 259: 99 continue ! 260: 9 9 9 continue ! 261: 99 99 continue ! 262: go to 41020 ! 263: 31020 ivdele = ivdele + 1 ! 264: write (i02,80003) ivtnum ! 265: if (iczero) 41020, 1031, 41020 ! 266: 41020 if (ivon01 - 1) 21020,11020,21020 ! 267: 11020 ivpass = ivpass + 1 ! 268: write (i02,80001) ivtnum ! 269: go to 1031 ! 270: 21020 ivfail = ivfail + 1 ! 271: ivcomp = ivon01 ! 272: ivcorr = 1 ! 273: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 274: 1031 continue ! 275: c ! 276: c write page footings and run summaries ! 277: 99999 continue ! 278: write (i02,90002) ! 279: write (i02,90006) ! 280: write (i02,90002) ! 281: write (i02,90002) ! 282: write (i02,90007) ! 283: write (i02,90002) ! 284: write (i02,90008) ivfail ! 285: write (i02,90009) ivpass ! 286: write (i02,90010) ivdele ! 287: c ! 288: c ! 289: c terminate routine execution ! 290: stop ! 291: c ! 292: c format statements for page headers ! 293: 90000 format (1h1) ! 294: 90002 format (1h ) ! 295: 90001 format (1h ,10x,34hfortran compiler validation system) ! 296: 90003 format (1h ,21x,11hversion 1.0) ! 297: 90004 format (1h ,10x,38hfor official use only - copyright 1978) ! 298: 90005 format (1h ,5x,4htest,5x,9hpass/fail, 5x,8hcomputed,8x,7hcorrect) ! 299: 90006 format (1h ,5x,46h----------------------------------------------) ! 300: 90011 format (1h ,18x,17hsubset level test) ! 301: c ! 302: c format statements for run summaries ! 303: 90008 format (1h ,15x,i5,19h errors encountered) ! 304: 90009 format (1h ,15x,i5,13h tests passed) ! 305: 90010 format (1h ,15x,i5,14h tests deleted) ! 306: c ! 307: c format statements for test results ! 308: 80001 format (1h ,4x,i5,7x,4hpass) ! 309: 80002 format (1h ,4x,i5,7x,4hfail) ! 310: 80003 format (1h ,4x,i5,7x,7hdeleted) ! 311: 80004 format (1h ,4x,i5,7x,4hfail,10x,i6,9x,i6) ! 312: 80005 format (1h ,4x,i5,7x,4hfail,4x,e12.5,3x,e12.5) ! 313: c ! 314: 90007 format (1h ,20x,20hend of program fm010) ! 315: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.