Home

User guide for Windows with IDE

image

Contents

1. 177 aEw dDe double precision exponent 4 178 aQwl d quadruple precision mantissa 4 182 aR w char edit descriptor 183 edit descriptor 184 Q edit descriptor 4 4 H 185 edit descriptor H y 4 z 189 zero field width in edit descriptors 4 4 190 derived type DT edit descriptor 4 4 191 RU round edit descriptors 4 4 192 DC DP decimal edit descriptors 4 4 193 comma after P optiona if followed by repeat H z 194 gO edit descriptor 195 unlimited repeat of format list compiler directives 201 OPTIONS statement 203 OPTION BREAK statement 204 EJECT statement 205 NOJLIST compiler directive 206 COMPILERC A 4 TABLE WITH FORTRAN 90 95 2003 2008 LANGUAGE EXTENSIONS no FUJ SG95 SF95 HP95 INT CVF AB95 gfort g95 PATH PGI 140 141 142 143 144 145 146 147 148 149 155 156 157 158 159 160 161 162 163 164 165 166 175 176 177 178 182 183 184 185 189 190 191 192 193 194 195 201 203 204 205 206 t t ett t t t 101 102 APPENDIX A SUPPORTED FORTRAN SYNTAX A 5 ABSOFT FORTRAN 77 EXTENSIONS 103 In the following sections some of the extensions are elucidated and the limitations of the FOR CHECK implementation of these extensions described A 5 Absoft Fortran 77
2. Cray Fortran 77 allows recursion in subprograms either by using the prefix RECURSIVE in the subprogram header or by specifying the recursive option in the command line when compiling In FORCHECK the RECURSIVE prefix is accepted for Cray Fortran 77 extension 216 Recursive reference without the RECURSIVE prefix can be enabled by specifying extension 229 in the configuration file A 11 Cyber NOS VE Fortran extensions The compiler directives are treated as comment You can use the NOS VE source code utility to prepare the source code to be analyzed by FORCHECK A 12 DEC PDP 11 Fortran 77 extensions DEC PDP 11 Fortran 77 does not support the full language but an extended subset FOR CHECK does not signal the usage of unsupported full language Fortran 77 features but optionally signals extensions to the full standard The keyword VIRTUAL is supported but the limitations in usage will not be checked DEC FORTRAN 4 synonyms for Fortran 77 keywords in OPEN and CLOSE are supported but are flagged A 13 DEC FORTRAN and VAX Fortran extensions VAX Fortran accepts more than 19 continuation lines as long as the records fit in the statement buffer Only when the statement buffer becomes full you have to specify the CONTINUATIONS qualifier FORCHECK accepts a maximum of 999 continuation lines for the VAX Fortran emulation You can specify the CONTINUATIONS qualifier to change this number or use the F77 qualifier to allow 19 con
3. Some compilers support directives using keywords in column 7 72 Detection of these keywords can be enabled if the keyword is present in the tables of Fortran language extensions FORCHECK can handle cpp preprocessor directives cpp preprocessing is enabled by enabling extension 7 in the configuration file You can also enable or disable cpp prepro cessing using the enable cpp command line option or by setting this option in the IDE Parameterized macro expansion is supported with some limitations The macro must be on a single line and variadic macros are not supported Macro expansion must be used with great care because it can cause significant characters be placed beyond character position 72 in fixed source format and change character constants If a file includes an other file with the Fortran INCLUDE statement the included file is not preprocessed Files included using the cpp directive include are preprocessed A 2 GENERAL LANGUAGE EXTENSIONS SUPPORTED 79 The usage of language extensions will be flagged when the Fortran standard conformance ST the Fortran 77 conformance F77 the Fortran 90 conformance F90 the Fortran 95 conformance F95 the Fortran 2003 conformance F03 or the Fortran 2008 conformance F08 option has been specified By specifying the flag obsolescent syntax OB option all language features which are marked as obsolescent in the Fortran standard which is in effect will be flagged 80
4. FALSE Note that the keyword value has to be placed within apostrophes You can concatenate a system configuration file with a private option file as described in the section Redefinition and suppression of messages In the FORCHECK IDE you can tune the output by selecting Options Preferences Output 4 16 Line or statement numbering By default FORCHECK numbers each source input line sequentially Lines in include files are numbered in an hierarchical way Line numbering starts anew for each source input file In this way you can use your editor to locate the lines of interest in the easiest way However you can instruct FORCHECK to number lines or statements in a different way To do so you can place count_mode option lines in the VARIOUS section of the configuration file The lines to be added have the form count_mode mode in which mode can be line number source input lines statement number statements new_in_sub start numbering anew for each subprogram new_in_file start numbering anew for each source input file new_in_include apply hierarchical numbering for included 50 CHAPTER 4 OPERATION lines c q statements continue_in_include proceed numbering sequentially for included lines c q statements For example if you want statement numbering beginning from 1 in each subprogram and proceed statement numbering sequentially in included lines you specify the following lines in the VARIOUS section of the co
5. invalid usage of automatic array specification e An automatic array must not appear in the specification part of a sub module invalid usage of assumed length e Only a dummy argument function result or named constant of type character can be specified with assumed length e The type length of a statement internal or module function cannot be of assumed length e The type length of a dummy statement function argument can not be of assumed length e A function with pointer valued result cannot be of assumed length invalid usage of adjustable length specification e Only dummy arguments or automatic objects can be specified with an adjustable length parameter e Statement functions and statement function arguments cannot be specified with adjustable length invalid length or kind specification default assumed e A kind type parameter must be a nonnegative scalar integer constant expression multiple specification of attribute invalid combination of attributes attribute not allowed in this context invalid to re define type or attribute OPTIONAL and INTENT only allowed for dummy arguments already specified PRIVATE 134 190 192 193 194 195 196 198 199 200 201 202 203 204 APPENDIX D MESSAGE SUMMARY e PUBLIC has been specified but PRIVATE has been specified before e PRIVATE has already been specified type parameter not allowed for this type invalid specification of type par
6. show informative messages INF Display and count informative messages Default INF show warnings WA Display and count warnings Default WA generate makefile MK m Append a makefile with dependencies and rules for the source files The leading part of the file is generated by the IDE Default NOMK rigorous syntax analysis RI Flag less robust and less portable code at the cost of more informative messages Do not limit the number of messages for a statement or argument list This option is useful when developing new code and to improve the quality of existing code Do not use this option when analysing a project for the first time Default NORI 4 3 OPTIONS 37 generate a report file RP Generate a report file r The default file name extension is rep If RP is specified without a filename the name of the report file will be FCK REP This is a command line option only Default NORP truncate names to 6 significant characters TR FORCHECK will check whether names are unique after truncation to 6 characters Default NOTR log LG Show defines and undefines of meta variables Default NOLG include path TP p Specify directories to search for include files Default NOTP define symbols DF s Define meta symbols for conditional compilation Default NODF 4 3 6 Specifying options in command mode When an option is specified with the listing file the option is global and is ther
7. 689 690 692 693 694 169 e The type length of this object must be known at compile time implicit characteristics are inconsistent with those in host context e The type of the entity has been declared in the host scoping unit however in the current scoping unit it appears to be a statement function You must declare this entity locally e The type of the object has been declared in the host scoping unit however in the current scoping unit it appears to be an EXTERNAL or INTRINSIC procedure You must declare the entity in the host scoping unit as EXTERNAL or INTRINSIC type length inconsistent with type length of function e All entries within a function must have the same type length One has the default length the other has an explicitly specified type length e The type length while referencing the function is inconsistently specified compared to the specification of the function One has the default length the other has an explicitly specified type length type length inconsistent with type length at first reference e The type length while referencing the function is inconsistently specified compared to the first reference One has the default length the other has an explicitly specified type length e The type length of an actual argument is inconsistently specified compared to the first reference encountered One has the default length the other has an explicitly specified type length e The type length of
8. default double precision DP Map all default reals to double precision and double precision to REAL 16 Map all default complex objects to double complex and all double complex to COMPLEX 16 See also default REAL 8 R8 Default NODP 32 CHAPTER 4 OPERATION flag undeclared external procedures EX Flag all external referenced procedures which have not been declared external Default NOEX The next five options are to verify for Fortran conformance for a specific language level They are provided to verify for upwards or downwards conformance relative to the language level of the current analysis In general however you should use the standard conformance option which verifies conformance for the language level used for the analysis Fortran 77 conformance F77 Check the syntax for conformance with the FORTRAN 77 standard All nonstandard syntax will be flagged Note that this option does not enable FORTRAN 77 syntax by itself To enable FORTRAN 77 syntax a configuration file of a FORTRAN 77 compiler must be selected Default NOF77 Fortran 90 conformance F90 Check the syntax for conformance with the Fortran 90 standard All nonstandard syntax will be flagged Note that this option does not enable Fortran 90 syntax by itself To enable Fortran 90 syntax a configuration file of a Fortran 90 compiler must be selected Default NOF90 Fortran 95 conformance F95 Check the syntax for conformance with the Fortran 95 s
9. E FORCHECK for Windows A Fortran Verifier and Programming Aid version 14 6 User Guide IDE December 3 2014 The information in this document is subject to change without previous notice and should not be taken as a commitment by Forcheck b v Forcheck b v can not assume responsibility for any errors which may appear in this document The software described in this document is furnished under a license and may be used copied or disclosed only when in accordance with the terms of this license Copyright Forcheck b v 1984 through 2015 All rights reserved FORCHECK has been developed by Erik W Kruyt FORCHECK is currently available for PC Windows and PC Linux FORCHECK is a registered trademark of Forcheck b v Absoft is a trademark of Absoft Corporation DEC PDP VAX AXP Alpha RSX VMS OpenVMS Ultrix and Tru64 UNIX are trademarks of Hewlett Packard Company DR Fortran 77 is a trademark of Digital Research Inc FTN77 and FIN95 are trademarks of Salford Software Ltd FTN90 is a joint trademark of Salford Software Ltd and the Numerical Algorithms Group Ltd Hewlett Packard UX Fortran 9000 are trademarks of Hewlett Packard Company IBM MVS VS Fortran Professional Fortran RS 6000 and AIX are trademarks of International Business Machines Corporation Intel is a trademark of Intel Corporation Cray Unicos CF77 and CF90 are trademarks of Silicon Graphics Inc Silicon Graphics IRIX and MIPSpro are tradema
10. ENTRY within REMOTE BLOCK construct too many END BLOCKS missing END BLOCK s ENTRY within a CASE construct type inconsistent with SELECT CASE expression type kind inconsistent with SELECT CASE expression kind invalid range of values specified e A range of values of type logical cannot be specified overlapping CASE range CASE statement expected after a SELECT CASE statement a CASE statement must be within a CASE construct too many END SELECT s 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 missing END SELECT s only one CASE DEFAULT statement allowed in a CASE construct CASE or END SELECT at invalid DO level CASE or END SELECT at invalid IF level ELSEIF ELSE or ENDIF at invalid CASE level invalid statement after WHERE ENTRY within WHERE construct too many END WHERE s an ELSEWHERE must be within a WHERE construct missing END WHERE s too many END FORALL s missing END FORALL s reference of FORALL index in a forall triplet specification list obsolescent terminal statement of DO loop e In Fortran 90 and up a terminal statement of a DO loop must be an END DO ora CONTINUE statement statement invalid within ASSOCIATE construct too many END ASSOCIATES s statement invalid within SELECT TYPE construct TYPE IS CLASS IS or CLASS DEFAULT at invalid DO level TYPE IS CLAS
11. RI option is in effect When the actual argument is a literal constant without a kind parameter or a constant expression of primaries without a kind parameter the type length is supposed to be the default type length of the type of the constant or constant expression 5 4 3 Verification of common blocks The type size and list of objects of common blocks are compared with the occurrence in the main program if present or with the first occurrence otherwise The size of the largest occurrence of the common block is presented in the cross reference table An occurrence of a common block with a different list of objects will be flagged with the message inconsistent list of objects If the rigorous syntax analysis RI option has been enabled each inconsistent object will be flagged separately An object could differ in type type parameters array length array rank or shape When the complete program CO option is in effect and all occurrences of a common block are identical common block objects which are not referenced not defined not associated or not defined before referenced will be listed If the rigorous syntax analysis RI option has 5 4 GLOBAL PROGRAM ANALYSIS 67 been enabled each common block object which is only conditionally defined before referenced is listed also When a common block has been specified in an include file it should be included from the same include file at all instances If that is not the case an in
12. 545 546 547 548 549 550 552 APPENDIX D MESSAGE SUMMARY function type length inconsistent with first occurrence e The type length of the function differs from that at the first reference encountered function type length inconsistent with first occurrence e The type length of the dummy function differs from that at the first reference en countered shape of function reference differs from shape at first reference shape of function reference differs from shape of function result procedure must have private accessibility e If one or more of the dummy arguments or the function result is of private type the procedure must be private multiple specification of prefix specification invalid combination of prefix specifications e A procedure cannot be specified elemental and recursive e PURE and IMPURE cannot be specified both procedure must be pure e Any procedure referenced in a pure subprogram a forall statement FORALL con struct or DO CONCURRENT construct shall be pure invalid usage of prefix specification dummy argument of elemental procedure must be scalar dummy arg of elemental proc must not be a pointer or allocatable elemental procedure must be scalar elemental procedure must not be a pointer or allocatable dummy procedure argument not allowed in elemental procedure referenced intrinsic procedure not declared INTRINSIC invalid usage of alternate return e An alternate return is only allowed in a
13. 90 APPENDIX A SUPPORTED FORTRAN SYNTAX A 4 TABLE WITH FORTRAN 90 95 2003 2008 LANGUAGE EXTENSIONS 91 A 4 Table with Fortran 90 95 2003 2008 language extensions 92 APPENDIX A SUPPORTED FORTRAN SYNTAX no F2003 F2008 Cray NAG XLF DEC FTN95 LF95 MSF maxima in lay out max number of characters per line 132 132 132 132 132 132 132 132 132 max number of cont lines fixed 255 255 255 255 99 19 19 99 max number of cont lines free 255 255 255 255 99 39 39 99 max length of names 63 63 63 250 31 63 240 31 max length of subprogram names 63 63 63 250 31 63 240 31 max length of common block names 63 63 63 250 31 63 240 31 type length modifiers INTEGER 1 4 4 4 INTEGER 2 4 4 4 INTEGER 4 4 4 4 INTEGER 8 4 4 4 REAL 4 4 4 4 REAL 8 4 4 4 REAL 10 REAL 16 4 4 4 COMPLEX 8 4 4 4 COMPLEX 16 4 4 4 COMPLEX 20 COMPLEX 32 4 4 4 LOGICAL 1 4 4 4 LOGICAL 2 4 4 4 LOGICAL 4 4 4 4 LOGICAL 8 x maximum length of type CHARACTER CHARACTER 255 CHARACTER 511 CHARACTER 16384 CHARACTER 32767 CHARACTER 65280 CHARACTER 65535 CHARACTER 2147483647 default source file name extension f f FOR default include file name extension include list option delimiter compiler directive string free form continuation character free form 1st column c
14. A system error is usually fatal 4 14 4 Redefinition and suppression of messages This section describes how to redefine the severity level flag of FORCHECK s diagnostic mes sages To suppress them temporary see the next section In the FORCHECK IDE you can redefine messages by selecting Options Preferences Messages When using the commandline interface you can redefine or suppress diagnostic messages by extending the configuration file used and add records using an editor consisting of the number of the message to be redefined along with the severity level flag that you want FOR CHECK to present The lines with the messages to be redefined must be placed in the section MESSAGES The numbers and default severity level flags of the messages can be found in the appendix message summary If you specify a level flag blank then the message will be suppressed fully and will not be counted either For Example 335 T 53 These compiler emulation file records specify that the diagnostic message type conflict now will be presented as Informative message and tab s used will neither be presented nor counted To present specific messages only you can suppress all diagnostic messages by placing the following line in this section suppress all and subsequently list all messages that must be presented with its severity level To activate this compiler emulation file see the section The usage of language extensions Y
15. All nonstandard syntax will be flagged 3 9 2 Compiler emulation By choosing the appropriate configuration file the correct language level is chosen and the supported language extensions are enabled If you want only those language extensions to be accepted that are in the next Fortran level you can specify one of the specific conformance options E g if you apply gfortran cnf and allow all extensions which are in the Fortran 2003 standard you specify the Fortran 2003 conformance F03 option 3 9 3 Setting your own or company standard You also can create a specific configuration file in which you enable those specific language extensions which are supported by all of the platforms you use and which are acceptable for 3 9 PORTABILITY AND CONFORMANCE TO STANDARDS 23 good programming practice You now can verify if all programs conform to this requirement 3 9 4 Cross platform development FORCHECK can also be used for cross platform development By specifying the compiler emu lation file of the target platform FORCHECK will analyze the program as if you were operating on that target Problems might arise when include files are being used which are not available or have filenames that are not acceptable on the host See the next subsection It could also be necessary to create interfaces for system calls that are not known on the host Please contact the FORCHECK developers for advise and assistance We like to help you and are interest
16. The INCLUDE line is supported but not conditional A 19 IBM VS Fortran V2 extensions In FORCHECK the maximum length for type character is set by default to 32767 for the VS Fortran emulation The default for the VS Fortran compiler however is 500 A larger length for type character for the VS Fortran compiler is allowed when specifying the CHARLEN len compiler option You also can adapt the FORCHECK configuration file used to have FORCHECK flag the usage of character lengths larger than 500 The free form source syntax is not fully supported A continuation character in front of the on line comment character is not always detected The PROCESS directive will be accepted but the compiler options specified have no effect The INCLUDE line is supported but not conditional 108 APPENDIX A SUPPORTED FORTRAN SYNTAX DEBUG packets are supported but with restrictions Within debug packets all variables are supposed to have the implicit type and no array element references are allowed Moreover invalid transfer of control from and into debug packets will not be signaled Asynchronous I O and double byte characters are not supported A 20 Intel Fortran extensions cpp preprocessing is supported with limitations fpp The compiler directive OPTIONS will be recognized but the specified options will have no effect The keyword VIRTUAL is supported but the limitations in usage will not be checked DEC FORTRAN
17. directories 51 DO loop max nesting 120 DO variable 201 dummy argument 66 operation code 60 double precision option 31 33 DP option 31 33 dummy argument operation code 60 dummy function type code 61 edit 28 editor 51 eject 103 entry cross reference 56 68 max number 120 not analyzed 67 referenced 61 type 58 68 type code 57 unreferenced 66 environmentals summary 16 EQUIVALENCE operation code 60 equivalence lists max number of 120 error exit status 38 EX option 32 exit status 38 error 38 fatal error 38 information 38 overflow 38 warning 38 expression actual argument 66 max nesting 120 operation code 60 type checking 33 type length 66 extensions Fortran 43 75 79 112 language 43 75 79 112 external 202 type code 61 68 external file access type 62 69 cross reference 69 format type 62 69 limited check 119 operation code 63 69 F03 option 22 32 44 53 54 79 113 116 F08 option 32 53 54 79 F2c Fortran 77 76 extensions 106 F77 option 32 54 79 F77L Fortran 77 76 extensions 108 F90 option 17 32 53 54 79 F95 option 32 53 54 79 fatal error exit status 38 FCKLIB 42 BA option 42 CM option 43 command 42 command line 42 HE option 42 input file 42 interactive mode 42 LI option 43 library file 42 operation 42 option 42 prompt 42 RM option 43 FF option 18 32 53 54 field see record f
18. if you follow the rules described below and use the configuration files supplied as examples you will be able to fulfill the job In the record allowed type lengths for generic procedures of the configuration file you can specify which argument type lengths will be accepted by a generic function to generate a specific function To allow the BYTE type as argument specify it as INTEGER 1 Each specific intrinsic procedure is specified by a header record and a record for each of its arguments The list of intrinsic procedures is delimited by a record with a zero The header record is composed of the following fields 1 Generic procedure name string If blank the procedure is specific only If non blank and if the procedure does not exist already it is added to the list of generic procedures 2 Specific procedure name string If the specific procedure name already exists the specific procedure specified overrules the existing one Otherwise the specific procedure name is added to the list of specific procedures If the generic procedure name is non blank the procedure is added to the chain of specific procedures which can be generated from the generic procedure 114 APPENDIX A SUPPORTED FORTRAN SYNTAX If the specific name is left blank the generic name is used as the specific name Specific procedures must have different names if they can be generated from a single generic procedure and have different resulting types or type
19. invalid usage of procedure pointer e A procedure pointer must not be dereferenced in an expression dummy argument has no INTENT attribute INTENT IN dummy argument must not be modified e The INTENT IN attribute for a non pointer dummy argument specifies that it shall not be changed during the execution of the procedure INTENT IN dummy argument pointer must not be modified e The INTENT IN attribute for a pointer dummy argument specifies that during the execution of the procedure its association shall not be changed INTENT OUT dummy argument is not defined INTENT OUT dummy argument pointer is not associated or nullified INTENT INOUT dummy argument is not modified in this procedure e The INTENT can be changed to INTENT IN INTENT INOUT pointer association is not modified in this procedure e The INTENT can be changed to INTENT IN INTENT INOUT dummy argument is defined before referenced e The INTENT can be changed to INTENT OUT INTENT INOUT dummy argument pointer is modified before referenced 879 880 882 883 884 885 886 888 179 e The INTENT can be changed to INTENT OUT an explicit RESULT variable must be declared for direct recursion specification expression expected missing END ASSOCIATE s pointer association is not defined pointer association of one or more component s is not defined SOURCE POSSIBLY IN FIXED FORM DO NOT SPECIFY THE FREE FORM OPTION array element or scalar str
20. more than one ELSE at this IF level invalid DO loop incrementation parameter e The incrementation parameter of an implied DO loop is too small invalid implied DO specification invalid DO loop specification terminal statement of loop at invalid IF level invalid terminal statement of DO construct e A DO construct must end with an executable statement but no IF ELSEIF ELSE ELSEIF DO STOP RETURN or END invalid transfer of control into construct 150 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 APPENDIX D MESSAGE SUMMARY e A branch is detected which transfers control into a DO an IF CASE WHERE or FORALL construct referenced from outside construct redefinition of DO variable or FORALL index within construct e A DO variable of an active loop is modified e An index name of a FORALL statement is modified in the forall statement or active FORALL construct ENTRY within DO construct terminal statement of DO construct out of order missing terminal statement of DO construct e No definition of the label of the terminal statement of the DO loop has been found e END DO missing missing END LOOP or UNTIL missing END WHILE or UNTIL too many END DO s END LOOP s or END WHILE s terminal statement of DO construct at invalid CASE level shared DO termination e This syntax is marked as obsolescent in Fortran 90 and up
21. 100 max maximum number of OPEN CLOSE INQUIRE keywords 100 max maximum number of OPEN CLOSE INQUIRE value keywords Appendix C History of changes See the supplied file history txt for all relevant changes that have been made to FORCHECK since the introduction of version 14 122 APPENDIX C HISTORY OF CHANGES Appendix D Message summary In this appendix all system and analysis messages are listed The messages which are not self explaining are elucidated 1 MESSAGE LIMIT REACHED FOR THIS STATEMENT OR ARGUMENT LIST e FORCHECK displays only the first 5 messages in a statement or argument list 2 E OPEN ERROR ON INCLUDE FILE e FORCHECK cannot locate or open the include file 3 E INCLUDE NESTING TOO DEEP e The nesting of include files is larger than FORCHECK can handle 4 O NEXT SOURCE RECORD TOO LONG REMAINDER NOT PROCESSED e The source input record is longer than FORCHECK can handle 5 O TOO MANY COMMENT RECORDS IN STATEMENT REMAINDER NOT PROCESSED e The number of comment lines in the statement is longer than FORCHECK can han dle 6 O STATEMENT TOO LONG REMAINDER NOT PROCESSED e The number of characters in the statement is larger than FORCHECK can handle 7 O TOO MANY STATEMENTS REMAINDER NOT PROCESSED e The number of statements in the program unit is larger than FORCHECK can handle 8 O NAME TOO LONG TRUNCATED e The identifier is longer than FORCHECK can handle 9 O ARRAY TOO
22. 282 283 284 285 286 288 289 290 292 293 294 APPENDIX D MESSAGE SUMMARY e The derived type of an object in COMMON or EQUIVALENCE must be of sequence type or have the BIND attribute e The type of a dummy argument must be of sequence type or have the BIND attribute if the type is defined in the local context e The type of an actual argument of an external procedure must be of sequence type or have the BIND attribute derived type or structure inconsistently included from include file e The derived type or structure has been specified in an include file at one occurrence and specified directly in another occurrence e The same derived type or structure has been specified in different include files component must be allocatable invalid usage of derived type name no type parameter unknown type bound procedure the parent type must be extensible invalid sequence of operators not allocated e A conditionally referenced or defined allocatable variable was not allocated e An INTENT IN argument was not allocated scalar integer constant expression expected undefined when entered through ENTRY specify SAVE to retain data scalar integer constant name expected scalar integer variable name expected e An integer which is not an array element array name constant external structure derived type name or namelist name is expected scalar integer variable expected constant or scalar integer variable
23. After completing the analysis a final report will be presented with a message summary 74 CHAPTER 5 ANALYSIS The message summary lists all messages presented and the number of messages in each category It will be stored in the report file and when the listing device is not your screen it will both be included in the listing file and presented on your screen If the log LG option has been enabled the usage of FORCHECK s internal tables will also be displayed Appendix A Supported Fortran syntax Forcheck supports the full Fortran 2008 syntax which includes Fortran 2003 Fortran 95 For tran 90 and Fortran 77 Moreover FORCHECK supports many of the language extensions of various compilers Not all the vendor specific Fortran language extensions which FORCHECK can support for a compiler being emulated are enabled by default The reason is that some of the language extensions are only provided to be compatible with earlier versions of that compiler or now have standard Fortran equivalents which you can use preferably Moreover some of the extensions make a program less secure for example less strict type checking so enabling these extensions will weaken the possibilities of FORCHECK to detect programming flaws FORCHECK has by default enabled only those Fortran language extensions which Are generally accepted and have no standard Fortran equivalent or are present in a more recent Fortran standard Impose no risk and can be
24. CH2 DATA CH1 CH2 2 Ifck 313 384 Isuppress possibly no value assigned and truncation CH1 123 CH2 ab Ifck 313 384 To suppress messages for a single compound or line with a list of statements only add the directive with the list of messages you want to suppress each preceded by a minus sign after the first line of the statement For example CHARACTER CH 120 DATA CH IF TRUE CH 123 Ifck 384 314 4 14 6 Reporting messages During subprogram analysis a message is presented in the listing file after the relevant source code statement In the report file or if no listing file has been requested the message is generally preceeded by the source code statement You can suppress the source code statement in the report file by specifying source_stm no in the VARIOUS section of the configuration file You also can suppress only the line or statement number of this source code statement source_linstm_number no When presenting a message FORCHECK adds a line with the filename and line number The format of this line can be specified e g file_line_format C file a line 10 The output of the filename and line can me made gnu conforming by specifying file_line_format a 10 If you replace the i0 edit descriptor by an x the line number will be suppressed When using the IDE you can adapt the formatting of the messages by selecting O
25. Cray Research Inc Mendota Heights Main USA June 1990 CF90 Fortran Language Reference Manual 1995 SR 3902 SR 3903 and SR 3905 2 0 Cray Research Inc Mendota Heights Main USA June 1990 David Bailey David M Vallance Olga Vapenikova Sara L Pulford FIN77 386 Reference Manual The University of Salford 1989 FIN95 User s Guide Salford Software Ltd 1998 XL Fortran for AIX Language Reference SC09 2348 00 IBM Corporation June 1996 XL Fortran for AIX User s Guide SC09 2349 00 IBM Corporation June 1996 Watcom FORTRAN 77 Language Reference 5rd Edition WATCOM International Corp Waterloo Canada 1995 ISBN 1 55094 104 6 Control Data 4000 Series FORTRAN Programmer s Guide and Language Reference Man ual Publication Number 62940786 Control Data Corporation Minneapolis 1990 Fortran 77 Language Reference Manual document No 007 0710 040 Silicon Graphics Inc Mountain View California 1991 184 52 53 54 59 56 APPENDIX E REFERENCES NagWare f90 Compiler VMS Release 2 0 The Numerical Algorithms Group Limited Ox ford UK 1993 ISBN 1 85206 098 0 FORTRAN 77 for Windows 95 Windows NT Reference Manual Absoft Corporation Rochester Hills MI USA 1995 MIPSpro Fortran 77 Language Reference Manual Document Number 007 2362 003 Silicon Graphics Inc 1994 1996 Fujitsu Fortran 90 User s Guide September 1995 Part No J2Z0 0080 01 EN Fujitsu Open Systems Solutions
26. Cyber NOS VE Fortran Version 1 level 1 6 PRS level 700 cd4000 cnf CD4 Control Data 4000 Fortran convex cnf CVX Convex Fortran Version 6 0 crayf77 cnf CF77 Cray Fortran 77 V4 decvms cnf DAV DEC Equipment FORTRAN for Open VMS Alpha decux cnf DEC Digital Equipment FORTRAN for Ultrix and DIGITAL UNIX domain cnf Apollo Domain Fortran SR 10 vax cnf VAX Digital Equipment VAX Fortran Version 5 0 and VAX Fortran HPO Version 1 0 f2c cnf F2C F2c Fortran 77 g77 cnf F77 GNU Fortran 77 hp77 cnf HP Fortran 77 for series 800 hp9000 cnf HP9 HP UX FORTRAN 9000 for series 300 400 700 and 800 ibmvs2 cnf VS2 IBM VS Fortran Version 2 Release 2 5 laheyf77 cnf LH Lahey F77L V5 00 and F77L EM32 V5 00 msf5 cnf MS5 Microsoft Fortran V5 1 and Microsoft Fortran PowerStation V 1 0 ndp cnf NDP NDP Fortran Release 2 0 pdp11 cnf PDP DEC Equipment PDP 11 Fortran 77 Version 5 0 prime cnf PR Prime Fortran 77 T1 0 21 0 prospero cnf PF Prospero Fortran V2 12 rm cnf RM Ryan McFarland RM Fortran V1 00 and IBM Professional Fortran V1 23 rm2 cnf RM2 Ryan McFarland RM Fortran V2 40 sgif77 cnf SGI Silicon Graphics MIPSpro Fortran 77 Version 3 4 1 sunf77 cnf SUN Sun Fortran 77 ftn77 cnf FTN Salford FTN77 V3 62 unisys cnf UNT Unisys 1100 Fortran 77 L10 watcom cnf WAT WATCOM Fortran 77 V11 0 Not all of the compilers are listed in the table The DEC FORTRAN for AXP VMS DAV extensions are equivalent to those of DEC only the default file name extensions differ For t
27. E 632 165 e By referencing the generic intrinsic procedure instead the code will be better read able transportable and easier to adapt to different type parameters conflict with intrinsic procedure name e A generic procedure has been referenced while the name of the generated specific procedure is already in use as a user defined dummy or statement function e The name of a common block must not be the name of an intrinsic procedure nonstandard Fortran intrinsic procedure no intrinsic procedure e A non intrinsic procedure has been specified in an INTRINSIC statement this intrinsic function is not allowed as actual argument e The intrinsic functions to determine the minimum and maximum and the type con version functions must not be passed as an argument type conflicts with intrinsic function of the same name e An intrinsic function has been generated or referenced while an intrinsic function with the same name and different data type has already been declared or used invalid number of arguments for intrinsic procedure invalid argument type for intrinsic procedure e The type of the argument of a specific procedure is incorrect e No specific procedure could be generated of which the argument type matches the actual argument type e A specific procedure has been generated with an argument type which matches the argument type of the first argument but the type of one of the other arguments does not match inval
28. EKOPath Compiler pgif03 cnf The Portland Group Fortran 2003 Compiler ftn90 cnf Salford FTN90 ftn95 cnf FTN Silverfrost FTN95 sgif90 cnf Silicon Graphics MIPSpro Fortran 90 Version 7 3 sgif95 cnf SG95 Silicon Graphics MIPSpro Fortran 95 sunf90 cnf SF90 Sun Fortran 90 sunf95 cnf SF95 Sun Fortran 95 The Fortran 90 95 extensions marked in the column F2003 of the table are included in the Fortran 2003 standard The Fortran 90 95 extensions marked in the column F2008 of the table are included in the Fortran 2008 standard A 2 General language extensions supported Tab formatting is supported when fixed form source is enabled If the first column of a fixed form input record consists of a tab succeeded by a digit as continuation character then the continuation character will be located at column 6 and the next characters from column 7 on If this tab is not followed by a digit the next characters are placed from 78 APPENDIX A SUPPORTED FORTRAN SYNTAX column 7 on Subsequent tabs or tabs in columns past the continuation field are expanded to blanks to columns 9 17 25 etc before processing the statement This is different from the way some compilers will treat tabs Some compilers consider tabs after column 6 as one blank character or discard tabs at these positions Because of this difference FORCHECK may locate characters past column 72 discarding them while the compiler will not This way has been chosen because an expansion of
29. Fortran 90 77 Lahey Fortran 95 77 language extensions 43 75 79 112 length array 69 common block 62 66 69 name 104 record 60 69 type 32 LG option 37 74 LI option 45 LI option 43 librarian 42 library file 29 compress 42 continuation 29 default extension 42 list 42 maintaining 42 max number of 120 option 37 remove 42 specification 29 usage 39 wild card 29 library utility see FCKLIB limitations 119 line numbering 49 52 list 42 list 103 list included lines option 34 54 list source lines option 34 54 list unreferenced items option 35 58 60 61 listing file 29 log option 37 74 LOGICAL 1 78 INDEX lower case 53 main program type code 57 68 make 28 make utility 51 makefile option 36 maxima 120 MDF option 34 65 message analysis 46 error 46 informative 46 max number that can be redefined 120 operational 46 overflow 47 redefinition 47 118 suppression 47 system 46 47 warning 46 message format 48 metrics 73 Microsoft Fortran 76 extensions 108 Microsoft Fortran PowerStation 76 77 extensions 108 MK option 36 module cross reference 69 type code 57 68 unreferenced 34 67 usage 41 verification 67 module data cross reference 35 70 undefined 67 unreferenced 34 60 67 module dependencies 21 35 65 file 45 65 sub tree 65 xml file 34 module dependencies file option 34 65 module dependency tree 21 module derived typ
30. Inc San Jose CA USA Intel Fortran Programmer s reference Version Number FWL 700 04 Intel Corporation USA 2002 Appendix F Glossary active DO variable A DO variable within the range of a DO loop actual argument An expression a variable a procedure or an alternate return specifier that is specified in a procedure reference aggregate field A composite or structured data item that is a Fortran 77 extension record structure or a record substructure alphanumeric A letter or a digit As an extension the dollar sign is in some implementations considered a letter analysis message An information warning or error message concerning the syntax or static semantics of the analyzed source program ANSI American National Standards Institute argument A parameter passed between a calling program unit and a procedure It can be an actual argument or a dummy argument argument association The relationship between an actual argument and a dummy argument during the execution of a procedure reference argument keyword A dummy argument name which may be used in a procedure reference array A set of scalar data all of the same type and type parameters whose individual elements are arranged in a rectangular pattern array element One of the scalar data that make up an array It is identified by the array name followed by a subscript indicating the position in the array array section A subobject of an array c
31. LONG LENGTH NOT VERIFIED 123 124 10 11 12 13 14 15 16 17 18 19 20 21 22 23 O O O Oo APPENDIX D MESSAGE SUMMARY e The length of the array is longer than FORCHECK can handle CHARACTER ENTITY TOO LONG LENGTH NOT VERIFIED e The character constant or type length is longer than FORCHECK can handle NUMBER CANNOT BE CONVERTED e The number concerned is too large for the system being used e The format of the number is not available on the system being used NAME TABLE FULL REMAINDER NOT PROCESSED e The table with identifiers is full When using many long names the name table can become full before the symbol table is full SYMBOL TABLE FULL REMAINDER NOT PROCESSED e The table with information concerning named entities is full CONTEXT TABLE FULL The number of contexts is larger than FORCHECK can handle NESTING TOO DEEP e The nesting of array subscripts function and subroutine argument lists is too deep e The nesting of implied DO loops in a DATA statement is too deep e The context nesting is too deep EXPRESSION STACK OVERFLOW e The expression is to complex to analyze EXPRESSION STACK UNDERFLOW e Internal FORCHECK error please report CONSTRUCT STACK OVERFLOW e The nesting of constructs is too deep DERIVED TYPE STRUCTURE NESTING TOO DEEP e The stack for nesting of derived types and structures is full TOO MANY OBJECTS IN DATA STATEMENT REMAINDER
32. MESSAGE SUMMARY e The type of a function actual argument of the dummy procedure differs from that at the first reference encountered argument type kind inconsistent with first occurrence e The type kind of an actual argument differs from that at the first reference encoun tered type kind inconsistent with first occurrence e The type kind of an argument of a dummy procedure differs from that at the first reference encountered e The type kind of a common block object differs from that in the first list encoun tered e The type kind is explicit in one instance and implicit in another e The type kind has been specified in one instance the type length in the other type of function argument inconsistent with specification e The type of a function actual argument differs from that in the specification of the procedure argument type kind inconsistent with specification e The type kind of an actual argument differs from that in the specification of the procedure shape of this argument must be supplied as argument e Adjustable shapes must be specified in each entry in which the array occurs array versus scalar conflict e An actual argument is an array name while at a previous reference the argument is a scalar or vice versa e An actual argument is an array name while the dummy argument is a scalar or vice versa e An actual argument is an array element of an assumed shape or pointer array while the dummy argument i
33. NOT VERIFIED TOO MANY EQUIVALENCE LISTS REMAINDER NOT PROCESSED TOO MANY ARGUMENTS REMAINDER NOT VERIFIED TOO MANY ARGUMENT SHAPES REMAINDER NOT VERIFIED 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 W 45 OO Ss O O O O lt lt O O 7 O O O O m 125 ROOT ENTRY NOT FOUND TOO MANY REFERENCES REMAINDER PRINTED IN SEPARATE SUB TREES TOO MANY PROGRAM UNITS REMAINDER NOT PROCESSED CROSS REFERENCE TABLE FULL REMAINDER NOT PRESENTED TOO MANY COMMON BLOCK OBJECTS TO CROSS REFERENCE LIBRARY ENTRY NOT FOUND TOO MANY LIBRARY ENTRIES REMAINDER NOT PROCESSED ARGUMENT KEY STACK FULL REMAINDER NOT PROCESSED e The stack with argument keys is full When using many long argument keys the argument key stack can overflow before the argument stack overflows CONDITIONAL COMPILATION SYMBOL TABLE FULL CONDITIONAL COMPILATION NESTING TOO DEEP INVALID NESTING OF CONDITIONAL COMPILATION META COMMANDS EXPRESSION COULD NOT BE EVALUATED STACK OVERFLOW WHILE PROCESSING REFERENCE STRUCTURE SOURCE POSSIBLY IN FREE FORM SPECIFY THE FREE FORM OPTION TOO MANY MESSAGES SUPPRESSED REMAINDER IGNORED NAME AND REFERENCE DO NOT FIT ON A LINE ENLARGE PAGE WIDTH a must not be the first nonblank character on a line invalid line e A non comment non compiler directive line with less than 6 characters has been read first li
34. Program units and procedures analyzed In this table all program units and module procedures which have been analyzed are listed with the page number of the listing and the filename in which the program unit or module procedure resides When you did not ask for a listing of a specific program unit its page number will be left blank When you use FORCHECK s library facility then a hierarchical page number system will be applied The library maintains a version number for each program unit which has been stored and for which a listing has been made This program unit version number becomes the library version number at the moment you insert or replace the program unit The library version number will increase at each FORCHECK run in which you update the library In the table of analyzed program units and procedures the version number and page number are shown as version page Referenced procedures not analyzed All referenced procedure entries which were not analyzed are listed here Because a program often references external procedures of which no Fortran source is available to include in the 68 CHAPTER 5 ANALYSIS FORCHECK analysis for example system library routines no separate messages will be pre sented for these undefined references To make the analysis more complete see the section Specification of procedure interfaces Cross reference of program units and procedures All names of the program modules block data program u
35. TYPE or WHERE statement and ending with the corresponding terminal state ment construct entity An entity defined by a lexical token whose scope is a construct cross reference table A table in which all references to certain entities are listed data entity An entity that has or may have a data value It may be a data object the result of the evaluation of an expression or the result of a function reference 188 APPENDIX F GLOSSARY data object A data entity that is a constant a variable a record Fortran 77 extension or a subobject of a constant data type See type debug line A source code line containing a character denoting conditional compilation in its first column default initialization If initialization is specified in a type definition an object of the type will be automatically initialized defined For a data object the property of having or being given a valid value deleted feature A feature in a previous Fortran standard that is considered to be redundant and largely unused derived type A type whose data have components each of which is either of intrinsic type or of another derived type designator A name followed by zero or more component selectors array section selectors array element selectors and substring selectors digit One of the characters 0 to 9 DO loop A range of statements executed repeatedly by a DO statement double precision The standard name for real data that is allo
36. The dependencies of modules is stored in XML format in the dependencies of modules file if the module dependencies file MDF file option has been specified This is a command line option only Using the Windows IDE you must add the module dependencies file name to the project as described in the chapter Operation section Adding files to the project 5 3 1 Display of dependencies for specific modules The dependencies of specific modules can be displayed by specifying these modules the root list in the show module dependencies SMD m option Now the module dependencies tree is displayed down from the modules specified only 5 3 2 Display of module dependencies in XML format The module dependencies are stored in XML format in the module dependencies file together with its data type definition dtd See the section Reference structure in XML format for information how to use this file 66 CHAPTER 5 ANALYSIS 5 4 Global program analysis Global program analysis is carried out if the verify program AP is in effect 5 4 1 Verification of procedure references FORCHECK checks the type of all references the type the type length the rank and shape of referenced functions Conflicts of user procedure names with intrinsic procedures are detected When the complete program CO has been enabled unreferenced procedures will be listed 5 4 2 Verification of argument lists The argument lists of each procedure reference is compa
37. The reference structure call tree is analysed if the analyse reference structure AR option is in effect The reference structure is presented in the listing file if a listing file has been requested and the show reference structure SRS option is in effect The reference structure is stored in XML format in the reference structure file if the reference structure file RSF file option has been specified This is a command line option only Using the Windows IDE you must add the reference structure file name to the project as described in the chapter Operation section Adding files to the project 5 2 1 Analysis of the reference structure If the analyse reference structure AR option and the rigorous syntax analysis RI is in ef fect the call tree will be traversed to detect unsaved common blocks and modules with unsaved public data which are not specified in the root of referencing program units Recursive references are traced also if one of the entries of a procedure in the chain is being referenced If recursive reference is not supported or the procedures in the chain are not specified RECURSIVE these procedures are flagged Moreover if the complete program 64 CHAPTER 5 ANALYSIS CO option has been specified and a procedure is specified RECURSIVE but is not recursively referenced it is flagged 5 2 2 Display of the reference structure All referenced procedures are presented in a call tree For each program unit or
38. an END FUNCTION or END SUBROUTINE statement For example 72 CHAPTER 5 ANALYSIS MODULE PLOTLIB INTERFACE FUNCTION MYFUNCARG1 ARG2 REAL MYFUN REAL INTENTCIN ARG1 REAL INTENTCIN OPTIONAL ARG2 END FUNCTION MYFUN END INTERFACE END MODULE PLOTLIB Include this module in the FORCHECK analysis by specifying it as an input source file or place it in a FORCHECK library file When using Fortran 90 or up you include the procedure interface in the program unit anal ysis by referring the module which defines the interface You do this with the USE statement for example USE PLOTLIB Even if you are still restricted to use FORTRAN 77 you can apply the Fortran 90 way for the FORCHECK analysis Just enable Fortran 90 or up syntax in the FORCHECK configuration file to analyze the interface modules and enable extension 217 modules for the analysis of the other program units Place the USE statement in an INCLUDE file which you conditionally use for the FORCHECK analysis For compilation you replace this INCLUDE file by one with an EXTERNAL statement specifying the procedure You can use the supplied utility INTERF to generate a module with interface bodies from a FORCHECK library file See the chapter Operation 5 5 3 Using FORCHECK attributes To define the interface for C or system procedures FORCHECK has the possibility to specify additional attributes for the procedure and dummy arguments For the global program analysis they
39. argument just enter the separating comma You can terminate a partially specified command line by a semicolon The unspecified arguments all assume the default values When you enter an incomplete list of arguments and no terminating semicolon has been specified FORCHECK prompts you for the next remaining arguments See the section Using FORCHECK in interactive mode for a full description of FORCHECK prompts Examples FORCHK PROG This is a simple and quick way to check the syntax of the sub program PROG FOR No listing file will be generated all messages will be sent to the screen FORCHK F77 SUBR1 SUBR2 PROGLIB CR The source files SUBR1 FOR and SUBR2 FOR are analyzed and compared for conformance with the FORTRAN 77 standard No listing file will be generated The global information will be stored in the newly created library PROGLIB FLB The reference structure and the interfaces between the program units will be checked FORCHK PRN CO SC SM PROGLIB A cross reference listing of all global information of the entire program as stored in the library file and cross reference listings of all common block objects and all public module variables will be produced and printed Unreferenced procedures unreferenced common blocks un defined and unreferenced common block objects unreferenced modules unreferenced and undefined public module variables will be listed 4 2 3 Response file entry Response files can be used to
40. before referenced e A new value was assigned to the variable before it was referenced e The dummy argument is apparently an output variable while the last operation on the actual argument was an assignment not locally defined specify SAVE in the module to retain data e The variable is not defined in this program unit or in the module where it is declared It could have been defined by another program unit using the module In that case you must save the data in the module to preserve the data From Fortran 2008 on module data are saved by default entity imported from more than one module do not use not allocated e An allocatable variable must be allocated before being defined or referenced not locally allocated specify SAVE in the module to retain data e An allocatable variable must be allocated before being defined or referenced The variable is not allocated in this program unit It is use associated but not saved From Fortran 2008 on module data are saved by default pointer not associated pointer not associated target not associated with a pointer 323 324 325 329 330 332 333 334 335 336 145 variable unreferenced e A variable has been defined but is not referenced variable unreferenced as statement label e A label has been assigned to this variable but the variable has not been referenced as a label input variable unreferenced e Avariable which is defined by a READ INPUT or DECODE
41. can analyze programs written in FORTRAN 66 FORTRAN 77 Fortran 90 Fortran 95 Fortran 2003 and Fortran 2008 Moreover FORCHECK supports many language extensions of the various compilers When using language extensions however a program can become less portable FORCHECK can be used to verify portability and to assist in converting Fortran programs from one platform to another When specifying the Fortran standard conformance ST option FORCHECK flags all devi ations from the Fortran standard of the level that is in effect e g Fortran 77 when a Fortran 77 compiler emulation has been chosen If the program is standard conforming you will have min imal problems when converting the program to platforms which support the same or higher level of the Fortran standard The flag obsolescent syntax OB option can be used to flag 44 CHAPTER 4 OPERATION syntax which is marked as obsolescent in the Fortran 90 and up standard The rigorous syntax analysis RI option additionally flags less portable code The Fortran level the types and language extensions of a compiler to be emulated are defined in a configuration file If you want FORCHECK to emulate a different compiler than the default compiler on your system you must do the following In the IDE select Options Preferences Compiler emulation and select the compiler emula tion file of your choice for example g95 cnf As an alternative you can edit the file forchk cfg in the FORCHECK user appli
42. can be specified in an external template procedure For the program unit analysis you can specify procedure attributes in an EXTERNAL statement which could be placed in an INCLUDE file which you conditionally use for the FORCHECK analysis For both the program unit analysis and the global program analysis you can specify the attributes in an interface body in a module These attributes have the form attribute list in which attribute list is a comma separated list of attributes You have to enable the type attribute extension nr 69 in your configuration file to use this facility The following attributes can be specified for dummy arguments OMITTABLE By specifying the OMITTABLE attribute for a dummy argument of a procedure template you can tell FORCHECK to allow the actual argument to be left empty PLURI By specifying the PLURI attribute for a dummy argument of a procedure template you can tell FORCHECK not to verify the argument 5 6 METRICS 73 VAL By specifying the VAL attribute for a dummy argument you specify that actual arguments have to be passed by value using the VAL built in function VMS An example of the specification of the VAL attribute is SUBROUTINE SUBCARG1 VAL The following attributes can be specified for external procedure names INQUIRY By specifying the INQUIRY attribute for a procedure template FORCHECK can indicate that the arguments do not have to be defined or associated For example R
43. consistently cannot be detected FORCHECK warns you if possible when a variable has not been defined in a program unit when a common block object has not been defined in the program use the complete program CO option to enable this feature when an allocatable variable has never been allocated or when a pointer has never been associated to a target or procedure However if an object is used as an input output actual argument FORCHECK cannot verify this In a limited number of cases FORCHECK reports when an item has been referenced before it was defined allocated or associated However the path flow analysis to detect this is limited As soon as a labeled executable statement has been encountered and either a forward reference to a label has been made or we are in a construct FORCHECK cannot signal this kind of errors any more So avoid labels and goto s This is another good reason to use IF and SELECT CASE constructs as much as possible By specifying the rigorous syntax analysis RI option FORCHECK will detect more occurrences of referenced before defined at the cost of more false alarms Arrays character variables and variables of derived type are treated as a single entity The individual array elements substring elements or structure components are not checked for unreferenced undefined or not allocated This is not only to reduce the storage and processing time requirements but also because most array and substring elem
44. context pointer assignment expected invalid usage of pointer assignment invalid assignment to pointer 148 370 371 372 373 374 375 376 377 378 379 380 382 383 APPENDIX D MESSAGE SUMMARY invalid target for a data pointer e the Object must have the POINTER or TARGET attribute to be assigned to a data pointer only pointers can be nullified target must have the same rank as the pointer shape of variable differs from the shape of the mask expression assignment of array expression to scalar integer overflow in assignment e The right site expression yields a value which does not fit in the left site target scalar integer variable name expected e An integer which is not an array element array name constant external structure derived type name or namelist name is expected scalar integer expression expected pointer not locally associated specify SAVE in the module e A pointer must be associated before being referenced The pointer is not associated in this program unit It is use associated but not saved From Fortran 2008 on module data are saved by default invalid operation on a non local variable in a pure procedure e A global variable must not be modified in a pure procedure e Allocation deallocation of global variables is not allowed in a pure procedure e pointer operations on global variables are not allowed in a pure procedure shape of mask expression differs from shap
45. dummy procedure argument is an output or input output argument and could modify the actual argument active DO variable invalid for this actual argument e The dummy procedure argument is an output or input output argument and could modify the actual argument not locally referenced e The variable is not referenced in this subprogram It could have been referenced by another subprogram using the module procedure program unit or entry not referenced e A procedure or program unit entry has been explicitly specified but is not refer enced named constant not used A named constant has been defined but is never referenced none of the objects of the common block is used none of the objects of the common block is referenced none of the entities stored in the library file is used common block object not used common block object unreferenced not used e An entity has been declared and possibly allocated initialized or assigned but is never used procedure not defined e The specified module procedure is not defined in the module common block object not defined before referenced common block object possibly not defined before referenced e The common block object was conditionally defined generic name was not needed to generate a specific procedure conflict with constant name e The name of a common block must not be the same as the name of a constant type length must be specified by a constant expression 688 E
46. easily converted to standard Fortran Improve the readability or the maintainability In the table in Section A 3 on page 81 89 the language extensions relative to Fortran 77 which are supported by FORCHECK are listed In the table in Section A 4 on page 91 101 the language extensions relative to Fortran 90 and Fortran 95 which are supported by FORCHECK are listed In the tables you can see which extensions are supported by FORCHECK and the various compilers A denotes an extension which is by default enabled by FORCHECK if the compiler emulation concerned has been chosen A o denotes an extension which is by default not enabled A means the support of that particular extension is explained in the text You can enable or disable each of the listed extensions by editing the appropriate configu ration file For Fortran 90 Fortran 95 Fortran 2003 or Fortran 2008 compilers you can use the respective default configuration file as a template See the section Changing the configuration file A 1 Compilers supported Configuration files for the following Fortran 77 compilers are supplied In the first column the filename of the configuration file is listed without the filename extension The second column 75 76 APPENDIX A SUPPORTED FORTRAN SYNTAX presents the mnemonic used in the table of Fortran extensions Configuration file Mnemonic Compiler name absoftf77 cnf AB Absoft FORTRAN 77 V4 3 cyber cnf CBR Control Data
47. eee a 73 SE Final report 2 4 5 be eda ar ee eae eA ww bale a ew ha Ew aed 73 Supported Fortran syntax 75 A1 Compilers supported osa ic a eh ee ee Cece ac ee a Be dae 75 A 2 General language extensions supported o ooo e 77 A 3 Table with Fortran 77 language extensions 1 0 0 0 00 eee eee eee 81 A 4 Table with Fortran 90 95 2003 2008 language extensions 91 A 5 Absoft Fortran 77 extensions aooaaeoa e 103 A 6 Apollo Domain Fortran extensions oo mm 103 A7 Compaq Fortran xtensionS lt sica daa eee e ee 104 A 8 Control Data 4000 Fortran extensi0OS oo es 104 A 9 Convex Fortran extensin s caci acesos a ee ee 104 A 10Cray Fortran 77 GX GNSIONS 2 5 2 2 6 3804 044 A ee eee es 104 Al Cyber NOS VE Fortran extensions ocio sa ee a So a a a ee as 105 A 12DEC PDP 11 Fortran 7 7 Xt nsiONsS cusco rs Ra Ae a y 105 A 13DEC FORTRAN and VAX Fortran extensions 0000 eee ee es 105 A 14Digital Research Fortran 77 extensions o ooo o es 105 A ISEZE FOAN 77 EXTENSIONS es ook aa daa eS ee ee es 106 A l1OGNU Fortran 77 EXTENSIONS oeoc oi aoon ioi ww ee a a 106 A 17HP UX FORTRAN 9000 and HP Fortran 77 extensions 00005 106 A 18IBM AIX XL FORTRAN extensions 1 2 107 A TQIBM VS Fortran V2 extensions si 2046 asda kn eee See ee ee ee a ee E 107 A 20Tntel Fortran extensions o 2 d 64 84 ds a Da ewe ee es 108 A 21 Lahey F7 L Fortran 77
48. host system Therefore FORCHECK will not check the syntax of the filename specified in the INCLUDE line for conformance to the syntax of the emulated compiler but allows for the various syntaxes So for example the VAX Fortran syntax INCLUDE CINCL1 NOLIST and INCLUDE MODEL INC1 will be accepted on all systems You cannot however use for example the syntax INCLUDE USER PROJ INCLIBCINCL1 on non VMS systems because on non VMS systems FORCHECK cannot open a member of an include library file The VMS symbolic path like MODEL in the example is stripped by FORCHECK to allow the file to be found on non VMS systems Mind that when emulating a certain compiler the default file name extension suffix of include files is adapted to conform to the defaults of the system and compiler chosen as described in the previous section 4 12 GENERATING FORTRAN 90 INTERFACES 45 4 12 Generating Fortran 90 interfaces The supplied utility INTERF takes a FORCHECK library file as input and produces a Fortran 90 module with an interface body for each of the subprograms in the library file The output is in Fortran 90 free source form This can be useful when converting from FORTRAN 77 to Fortran 90 and to examine the properties of the subprograms as they are contained in the library file By specifying the module in the program units which reference these subprograms the interfaces of the subprograms become explicit and both the compiler an
49. in one or more module procedures of the module in which the constant or variable is specified the module name is listed instead of the these individual module procedures 5 5 SPECIFICATION OF PROCEDURE INTERFACES 71 A in front of a subprogram name indicates that the variable is re defined directly in that subprogram Mind that if a variable is used as an actual argument in a subprogram the variable may be re defined indirectly Because the amount of information can be huge if you have many modules with many public variables FORCHECK s internal tables can easily become full In that case you have to split up the process in several runs in which you request the cross references of the variables of a limited number of modules at a time The optimal procedure is to compose a FORCHECK library file first and to analyze this library file repeatedly 5 5 Specification of procedure interfaces You can make the analysis more complete by defining the interface for all procedures which have not been included in the analysis such as system procedures and third party procedure packages There are two ways to specify procedure interfaces namely applying the traditional FORTRAN 77 syntax or using the Fortran 90 95 syntax features 5 5 1 Using FORTRAN 77 syntax You can use FORTRAN 77 syntax to specify a procedure interface by constructing a template for the procedure Just specify the appropriate procedure statement FUNCTION or SUBROUTINE with
50. in the effective Fortran standard PARAMETER statement within STRUCTURE e Defined named constants are not local to the structure so they can better be placed outside the structure definition deleted Fortran feature e This syntax is marked as deleted in the effective Fortran standard DATA statement among executable statements e This is marked as obsolescent in the Fortran 95 standard statement not allowed within a pure procedure statement not allowed within an interface block statement only allowed within an interface block statement only allowed within the spec part of a sub module statement only allowed in interface block or spec part of subprog statement not allowed within a BLOCK construct 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 129 lexical token contains blank s e In free form source form blanks in a name literal constant operator or keyword are not allowed blank required in free source form use a blank to delimit this token e In fixed form source form of Fortran blanks are not significant but the absence of a delimiter between these lexical tokens might indicate a syntax error lexical token contains non significant blank s e In fixed form source form blanks are not significant However a blank in a name literal constant operator or keyword might indicate a syntax error name or operator too long e The name or is longer than 6 charact
51. interface not referenced e An abstract procedure interface has been specified but it is not used type bound procedures not allowed in sequence or interoperable type a component cannot have the name of a type parameter e KIND or LEN must be specified for a derived type parameter declaration e Only KIND and LEN are valid derived type parameter attributes derived type parameter not defined e Each derived type parameter must be specified with the KIND or LEN attribute a CLASS component must be allocatable or a pointer a procedure component must be a pointer no components specified in derived type definition no type bound procedures specified external or module procedure expected type bound procedure undefined DEFERRED attribute required DEFERRED attribute not allowed component keyword missing in structure constructor e When in a structure constructor a keyword has been used all subsequent compo nents must be specified using keywords keyword missing in type param spec list e When in a parameter list a keyword has been used all subsequent parametes must be specified using keywords incorrect or missing language binding spec BIND C expected e the language binding spec must be BIND C no enumerators in enumeration END ENUM missing 172 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 APPENDIX D MESSAGE SUMMARY interface name not allowe
52. line or statement numbers of all occurrences of the name of the variable The line or statement numbers at which the variable is re defined are flagged with a The kind of usage of variables and procedures is presented as a set of operation codes with the listed meaning Only one set of operation codes is presented for each variable The set of operation codes presented is the or ed set of operation codes on all array elements structure components or character positions of a variable The operation codes of the various array elements components or character elements cannot be viewed separately operation codes A defined by means of an assignment statement an actual argument associated with an INTENT OUT dummy argument a statement function definition statement an ASSIGN statement associated variable in DEFINE FILE or OPEN IOSTAT in an IO statement an INQUIRE statement C in COMMON D initialized in a DATA or explicit type statement input by means of READ or ACCEPT list in DECODE conversion buffer in ENCODE internal file in a READ L DO variable or FORALL index O output by means of WRITE TYPE PRINT list in ENCODE buffer in DECODE internal file in a WRITE P dummy argument 60 CHAPTER 5 ANALYSIS Q in EQUIVALENCE R referenced for example by means of an expression an argument of an intrinsic procedure an argument of a statement function an actual ar
53. listing See list file source file A file containing the original text of a program source program The original text which forms a FORTRAN program specific function An Fortran supplied intrinsic function which can be referenced directly or by referencing a generic function which invokes the specific function depending on the type of the actual arguments specification statement One of the set of statements that provides the compiler with informa tion about the data used in the source program It supplies the information required to allocate data storage standard conforming See conformance statement A sequence of lexical tokens It may consist of a single line but can be continued using a continuation character or can be limited to occupy part of a line by a separation char acter statement entity An entity identified by a lexical token whose scope is a single statement or part of a statement statement function A procedure specified by a single statement statement label A lexical token consisting of up to five digits that precedes a statement and may be used to refer to the statement static analysis The analysis of the source code without execution of the program static analyzer A tool to perform static analysis static semantics The meaning of the code as far as it can be directly inferred from the code without knowing the algorithm storage association The relationship between two storage sequences
54. of the references in the various subprograms will only be verified during global program anal ysis You need to specify this option if you analyse an unrelated set of program units or if you have modified interfaces and have not yet updated the FORCHECK libraries containing the interfaces Default NOAQI maximum number of continuation lines CN Allow for a maximum of the specified number of continuation lines If not specified the maxi mum is that as specified in the configuration file Default NOCN enable cpp preprocessing CPP For files with a filename extension of FPP the default is CPP For all other files the default is NOCPP flag implicitly typed DC Present a warning for all variables that are not explicitly declared in a type statement This is equivalent to specifying the IMPLICIT NONE statement in the source code as supported by Fortran 90 and as a language extension of many FORTRAN 77 compilers Default NODC process D lines DE For compilers which support D_lines lines with D or d in the first column of the source input records will be processed They will be treated as comment lines otherwise For emulation of the Microsoft Fortran compiler you can specify one character to control the lines you wish to include in the processing DE character If the debug character is not specified D is assumed All other lines with an alphabetic character in the first column will be treated as comment Default NODE
55. of zero length invalid binary octal or hexadecimal constant kind type parameter of real constant not allowed for this exponent e If the kind is specified only E is a valid exponent letter invalid complex constant invalid Hollerith or Radix constant missing character to escape in C string e The closing apostrophe or quote of the C string is preceded by a invalid usage of named constant e A named constant is used in a context where a variable or procedure name is ex pected e In standard Fortran no named constants are allowed to define the real or imaginary part of a complex constant real or integer constant expected character length too large e A character constant or variable is longer than the emulated compiler can handle number too large implicit conversion of scalar to complex 146 147 148 149 150 152 153 154 155 156 158 159 160 162 163 131 e An integer or real value is assigned to a complex variable The imaginary part of the complex becomes zero If the real is zero this information is only presented if the rigorous option has been specified unsigned nonzero integer expected unsigned integer expected positive integer expected integer too large for its kind integer larger than default invalid or unrecognized attribute PRIVATE is already the default e PRIVATE has already been specified PUBLIC is already the default implicit type already used type
56. probably have no difficulty with analyzing your source code using this emulation If you use a different compiler you can do the following Select Options Preferences Compiler emulation from the IDE and select the compiler emula tion of your choice for example the gfortran compiler When using FORCHECK in commandline mode set the environmental variable FCKCNF to the path of the configuration file of your choice for example for the gnu Fortran compiler gfortran SET FCKCNF C Program Files x86 Forcheck share gfortran cnf Mind that specifying one of the standard conforming options such as the Fortran 90 con formance F90 option does not enable the accompanying language level Fortran 90 but 17 18 CHAPTER 3 TUTORIAL merely forces reporting any deviation from this language level standard 3 2 Analyzing a single source file It is advisable to start simply by analyzing a single source file Choose a source file containing a program unit that does not use modules or one that contains all the referenced modules In this way you can verify the settings and experiment using some of the options A demo project fckdem is supplied in the examples directory To perform an analysis you first have to open an existing or create a new FORCHECK project Select Project Open Project or Project New Project from the Menu bar or click on the Open or New icon on the tool bar After selecting or creating a projectfile the project view is shown
57. required argument must be a data object derived type io procedure must be a subroutine type must be abstract argument must be scalar argument must be polymorphic 174 775 776 777 778 779 780 781 782 783 784 785 786 APPENDIX D MESSAGE SUMMARY argument must not be polymorphic the accessibility of the generic spec must be the same as originaly the accessibility is inconsistently specified types are not compatible a CLASS entity must be dummy allocatable or a pointer entity is not accessible entity must be interoperable type kind conflict with type kind of function e All entries within a function must have the same type kind e The type kind while referencing the function differs from the specification of the function function type kind inconsistent with first occurrence e The type kind of the function differs from that at the first reference encountered type kind inconsistent with type kind of function e All entries within a function must have the same type kind One has the default kind the other has an explicitly specified kind e The type kind while referencing the function is inconsistently specified compared to the specification of the function One has the default kind the other has an explicitly specified kind type kind inconsistent with type kind at first reference The type kind while referencing the function is inconsistently specified compared to the first referenc
58. shorter than two characters If it has a length of two characters it cannot end with an R or an A If a value keyword starts with the characters of another value keyword this value keyword has to be specified first If a value keyword may be split up in more than one part separated by blanks include a blank in the specification at these positions A specific value keyword can be specified for two different open keywords and one close keyword If the value can be a variable the first character of the value type field denotes the type of the value N no value expected any type allowed E external expected T integer datum expected key description expected L label or logical expected C character U unit specifier expected Y scalar default char variable expected The second character of the value type field denotes reference or assignment R reference A assignment For OPEN and CLOSE R is the default for INQUIRE A is the default Note that the value type and reference assignment character are to be specified in a single string field for example IA to denote an integer assignment 118 APPENDIX A SUPPORTED FORTRAN SYNTAX 4 Synonym keyword string Here you can specify for which keyword the keyword is a synonym If the keyword is no synonym specify a blank string If nonblank the value type field is not relevant Synonyms will be flagged as nonstandard 5 Stan
59. specified automatic or static and must not be a pointer An automatic static or allocatable object must not be equivalenced A target in a pointer initialization must not be allocatable An assumed type object must not be allocatable conflict with program unit or ENTRY name The name of a constant as defined in a PARAMETER statement must not be the same as a global name of the subprogram such as the name of the program unit or an entry The name of a common block must not be the same as the name of a program unit or ENTRY conflict with common block name 219 220 222 223 224 137 The name of a constant as defined in a PARAMETER statement must not be the same as the name of a common block specified in the current subprogram A global name such as the name in a PROGRAM BLOCKDATA SUBROUTINE FUNC TION or ENTRY statement must not be the same as the name of a common block of the program E invalidly in COMMON EQUIVALENCE or NAMELIST A dummy procedure argument automatic or allocatable variable and a pointee can not be stored in a common block and must not be equivalenced A pointer array cannot be stored in common If a compiler supports NAMELIST as a FORTRAN 77 extension a dummy argument and a pointee can not be placed in a namelist A dummy argument with non constant bound a variable with nonconstant character length an automatic object a pointer a variable of a type that has a pointer or all
60. subroutine which is not elemental invalid dummy argument list invalid usage of arguments e In an EXTERNAL or INTRINSIC specification a single procedure name without argu ments is required 553 554 559 556 357 558 559 560 561 562 563 564 159 e Ina dummy argument list a dummy procedure must not have arguments e In the reference of an external procedure in USEROPEN no arguments are allowed invalid usage of dummy argument e The name of a dummy procedure argument has been used as the name of a statement function e A pointee cannot be a dummy argument invalid dummy argument e A dummy procedure argument cannot be a constant or expression more than once in argument list A dummy argument is specified more than once in the dummy argument list e An argument keyword is specified more than once in the actual argument list argument unreferenced in statement function A dummy argument of a statement function is not referenced in the statement func tion dummy argument not used missing argument list e In an expression or in an output statement a function must have an actual argument list This argument list can be empty e Ina FUNCTION statement an argument list is required This list can be empty argument missing or no corresponding actual argument found e A null argument is nonstandard Fortran e A non optional actual argument is missing e No actual argument with the dummy argument
61. tabs will generally be used when source code is transformed to standard Fortran 77 or when sending your program to a different computer system Moreover the compiler will probably expand tabs in the source listing In the FORCHECK way you can see which characters will be interpreted by any compiler and which may not Though some compilers accept longer source records e g in free form the maximum record size FORCHECK can read is 512 characters after expansion of tabs and of cpp macros Though some compilers support an unlimited number of continuation lines FORCHECK can read up to 999 continuation lines LOGICAL 1 data are treated as logicals BYTE data as integers The nonstandard form of the PARAMETER statement without parentheses is not equiva lent to the standard Fortran PARAMETER statement In the nonstandard form the type of the named constant takes the type of the literal constant which may be different from that of the implicit or specified type of the name using the Fortran 77 syntax Though a specific compiler may support longer names FORCHECK supports names of up to 64 characters only Some compilers support directives which are identified by a key in the first columns fol lowed by a keyword These compiler directive strings can be specified in the configuration file Some of these directives will not only be accepted but also interpreted by FORCHECK see the notes on each specific compiler emulation
62. the analysis by clicking on the Analyse all files tool bar icon The F check FULL icon You now can view the report and listfile 2 15 Summary of environmental variables FCKCNF path of the emulation configuration file to be used FCKDIR FORCHECK s base installation directory FCKOPT default options INCLUDE additional search paths for include files TMP path for scratch files Chapter 3 Tutorial FORCHECK has many possibilities to analyze your source code A configuration file and numer ous options are available to tune the analysis to your needs To learn how to use FORCHECK from scratch this tutorial will guide you by taking small steps from the analysis of a single pro gram unit up to a large project For a complete description of the IDE and the command line interface see the chapter Operation For a precise clarification of the analysis see the chapter Analysis 3 1 Setup FORCHECK can handle many Fortran levels dialects and language extensions Before analyz ing your source code you must instruct FORCHECK which Fortran language level and dialect to apply Numerous incorrect and superfluous messages will appear otherwise By choosing the configuration file that matches the compiler you use you define the Fortran language level dialect and language extensions that will be accepted The Intel Fortran 95 compiler emulation is applied by default This is a Fortran 95 com piler with many language extensions so Forcheck will
63. 00 max nesting of DO IF ELSEIF ELSE SELECTCASE CASE 7 max nesting of implied DO loops in DATA statement 30 max nesting level in an expression 2000 max number of objects being checked in an argument list or equivalence list 4000 max number of shape bound or vector values in an argument list equivalence list or common block list 16 max number of derived type parameters for a derived type 20000 length of argument key list 4000 max number of objects in a common block list or data list 200000 max number of entries in the symbol table 1000 max number of references in a cross reference table presented 1000000 max total number of references in the cross reference tables 1000 max number of non analyzed procedures presented 100 max number of messages that can be redefined 25 max number of common blocks specified with the show common SC c option 25 max number of modules specified with the show public module derived types SMT m option 25 max number of modules specified with the show public module data SMV m option 25 max number of roots specified with the show reference structure SRS r option 25 max number of roots specified with the show module dependencies SMD m option 20 max number of program units specified with the include IL option 50 max number of include directories specified with the include path IP p option 500 max maximum number of intrinsic procedures
64. 1 FOR FOR 80 99 31 7 anaona 80 19 7 7 80 32 32 32 F77 96 99 31 31 31 989999898909 SONS 2909856 t et ett A 3 TABLE WITH FORTRAN 77 LANGUAGE EXTENSIONS no SGI SUN HP9 DEC CD4 RM RM2 MS5 LH PF NDP FTN WAT AB F2C 132 132 80 132 132 80 80 80 80 80 80 132 99 99 19 19 19 99 19 61 99 32 32 31 32 31 31 31 31 31 31 32 32 31 32 32 31 32 8 8 31 31 31 31 32 32 31 32 32 31 32 8 8 31 31 31 31 32 32 31 L i 4 L L L a L L ip a 4 L 4 as L L L L 4 L 4 Pp L L L L 4 L 4 4 sb ue L L p L p a f f f f f FOR FOR FOR FOR FOR f FOR FOR f FOR FOR amp amp i 1 4 H H H 2 H H H 3 L 4 H H H H H H 4 5 H H H H 6 H 4 H H H 4 7 8 10 11 13 4 14 4 H 15 16 17 18 83 84 APPENDIX A SUPPORTED FORTRAN SYNTAX no PDP VAX VS2 UNI CBR PR CF77 CVX constants 20 character constants between de 21 REAL 16 with Q exponent 22 named constants in co
65. 1 7 Setting file options To set file options first select the source files or the reference library files on which you like to set options Select Options File options from the Menu bar or right click on one of the selected filenames and select File options A file options window appears and you can check or uncheck each enabled option For a description of the options see the section Options 4 1 8 Saving a project To save the project select Project Save project from the Menu bar The project information is stored using the filename as specified when opening the project By choosing Save project as you can specify a new filename to store the project data You also can click on the Save project or Save project as toolbar icon If you try to close the FORCHECK IDE and the project has been changed but not yet saved you are requested to do so 4 1 9 Starting the FORCHECK IDE from the Windows Explorer During installation fcp files are associated with the FORCHECK IDE So when you have cre ated a project you can start the FORCHECK IDE directly from the Windows Explorer by double clicking on the project file 4 1 10 Project analysis To start the analysis of all files in the project select Analysis Project analysis from the Menu bar or click on the Project analysis tool bar icon The F check FULL icon The FORCHECK analyzer is started and the analysis is carried out The progress is shown in the report window 28 CHAPTER 4 OPERATION Af
66. 16 RECURSIVE H 217 MODULE 220 argument list in PROGRAM statement t 221 type len FUNCTION name 222 type FUNCTION name len O O O 223 F90 interface block 224 F90 internal subprograms 225 Unisys internal subprograms 226 array valued functions 227 END INTERFACE name 228 STDCALL 229 recursive subprograms O commons 85 initialization of blank COMMON o o o o o 86 differing lengths for a named COMMON o o o o o 87 initialization of COMMON not in BLOCK DATA o o o o o 88 mixing of numeric and character in COMMON o o o o executable statements 93 WHERE 94 FORALL 95 EXIT CYCLE 96 DO label WHILE ENDDO 97 SELECT CASE 98 debug packet statements 100 named constructs 101 Watcom constructs 102 REMOTE BLOCK EXECUTE general syntax 109 array constructor 110 XOR exclusive or as NEQV o o o o o o 111 alternate relational operators lt etc 112 alternate return label amp label o o 113 alternate return label label o 114 RETURN in main as STOP o 115 null arguments When extension 67 is enabled the Salford variant of STDCALL is accepted A 3 TABLE WITH FORTRAN 77 LANGUAGE EXTENSIONS no SGI SUN HP9 DEC CD4 RM RM2 MS5 LH PF NDP FTN WAT AB F2C 73 74 75 76 77 78 79 80 81 82 83 84 215 216 217 220 221 222 223 224 225 226 227 2
67. 18 Default integers and logicals occupy 8 bytes by default flag dummy arguments with no INTENT attribute INTENT Flag dummy arguments for which no INTENT attribute has been specified Default NOINTENT flag undeclared intrinsic procedures INTR Flag referenced intrinsic procedures which have not been declared intrinsic Default NOINTR flag obsolescent syntax OB Flag syntax which is marked as obsolescent in the Fortran standard which is in effect Default NOOB default REAL 8 R8 Map all default reals to double precision Map all default complex objects to double complex See also default double precision DP Default NOR8 relax type checking RE Relax type checking on integers logicals and Holleriths Mixing of integers and logicals in log ical and relational expressions will be accepted Hollerith constants may be used in relational expressions Default NORE save variables SAVE Save all variables by default Default NOSAVE flag specific intrinsic procedures SF Flag referenced specific intrinsic procedures Default NOSF Fortran standard conformance ST Check the syntax for conformance with the Fortran standard of the level that is in effect All nonstandard syntax will be flagged Default NOST 4 3 2 Global analysis options complete program CO The complete program is analyzed and FORCHECK will flag unreferenced procedures unrefer enced and undefined common blocks unreferenced
68. 28 229 85 86 87 88 93 94 95 96 97 98 100 101 102 109 110 111 112 113 114 115 oo o o oo0 0 87 88 APPENDIX A SUPPORTED FORTRAN SYNTAX no PDP VAX VS2 UNI CBR PR CF77 CVX 116 array expressions but no dummy or alloc 117 F90 array expressions and sections 118 constant arrays constructors and substr 119 END program unit name 120 keyword actual arguments 121 zero sized data objects type checking 125 mixing of DP and COMPLEX in expressions 126 string argument compatible with Hollerith O O O o 127 strings can be assigned to INT REAL LOG o o 128 strings can be ass to BYTE and LOGICAL 1 o o 129 boz constants can be used in expressions 130 boz constants in PARAMETER statement 131 equivalence of numeric and character o o o o 132 real array indices and substring expressions o o o o 133 i and 1 const comp with shorter dummy I O statements 140 ACCEPT TYPE 141 INPUT 142 ENCODE DECODE o o o o 143 FIND DEFINE FILE 144 direct access lun record o 145 READ PRINT INPUT without format 146 READCKEY REWRITE DELETE 147 LOCKING 148 UNLOCK I O 155 NUM in READ 156 list directed on internal file 157 F90 nonadvancing I O 158 Formatted derived type I O OPEN CLOSE INQUIRE
69. 304 copy bounds and values from SOURCE and MOLD 305 DO label CONCURRENT ENDDO 306 FORALL index kind specification 307 BLOCK construct 308 EXIT any construct general syntax 309 STOP and ERROR STOP with constant expression 310 F2003 array constructor enhancements 311 co array 312 real and imag part ref 320 internal procedure as actual argument 321 unallocated actual argument allowed for optional dummy 322 target actual arg assoc with dummy pointer 323 reference of pointer function 109 F2003 array constructor syntax 110 XOR exclusive or as NEQV O O o 112 alternate return label amp label 113 alternate return label label 114 RETURN in main as STOP o o 115 null arguments 124 F2003 structure constructors comp keywords type checking 126 string argument compatible with Hollerith o o 127 strings can be assigned to INT REAL LOG o o 128 strings can be ass to BYTE and LOGICAL 1 o 129 typeless BOZ can be used in expressions 131 equivalence of numeric and character O o o o 132 real array indices and substring expressions o o o 133 i and 1 const comp with shorter dummy 4 134 passing character scalar actual to dummy array 4 4 135 BOZ constants in CMPLX DBLE INT REAL H H 136 intrinsic assignment of characters of different H kinds A 4 TABLE WITH FORTRAN 90 95 2003 2008 LANGUAGE EXTE
70. 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 al 183 RM FORTRAN User s Guide Version 2 4 DOS Ryan McFarland Corporation 1987 IBM Personal Computer Professional FORTRAN Reference Manual International Business Machines Corporation first edition 1984 Microsoft FORTRAN Version 5 1 for MS OS 2 and MS DOS Operating Systems Reference Document No LN21013 0591 Microsoft Corporation 1991 Microsoft Fortran Power Station Professional Development System Version 1 0 for MS DOS and Windows Operating systems Language Guide document No DB38033 0293 Microsoft Corporation 1993 Microsoft Fortran Power Station Version 4 0 Development System for Windows 95 and Windows NT workstation Programmer s Guide document No DD64081 0995 Microsoft Corporation 1995 F77L Fortran Language System Reference Manual Revision E Lahey Computer Systems Inc August 1989 F77L EM 32 Fortran Language System Reference Manual Revision B Lahey Computer Systems Inc June 1989 Fortran 90 Language Reference Revision B Lahey Computer Systems Inc 1995 Lahey Fujitsu Fortran 95 Language Reference Revision D Lahey Computer Systems Inc 1998 Lahey Fujitsu Fortran 95 User s Guide Lahey Computer Systems Inc 1998 NDP Fortran Reference Manual MicroWay Inc Kingston Massachusetts USA April 1990 CF77 Compiling System Volume 1 Fortran Reference Manual SR 3071 4 0
71. 4 synonyms for Fortran 77 keywords in OPEN and CLOSE are supported but are flagged Type attributes are skipped except for ALLOCATABLE which is processed to allow for allocatable arrays The limitations and consistency in usage of the attributes are not verified A 21 Lahey F77L Fortran 77 extensions The number of continuation lines is unlimited for the Lahey compilers FORCHECK can read a maximum of 999 continuation lines A 22 Microsoft Fortran extensions The syntax extensions listed apply for both Microsoft Fortran V5 1 and Microsoft Fortran Pow erStation V1 0 The compiler directives are supported Type attributes are skipped except for ALLOCATABLE which is processed to allow for allocatable arrays The limitations and consistency in usage of the attributes are not verified Array expressions are supported but user supplied functions cannot produce an array result Most extensions of Microsoft Fortran PowerStation V4 0 are supported However only simple logical expressions name oper const in the if and elsif directives are supported A 23 NDP FORTRAN EXTENSIONS 109 A 23 NDP Fortran extensions The NDP compiler can read source records up to 132 characters in fixed form mode and 13200 in free form mode FORCHECK only reads a maximum of 256 characters NDP Fortran supports C string backslash editing if the compiler option f6 is specified FORCHECK can support backslash editing by enabling extension numb
72. 6 5 1 9 Programsunilt Cross references camara ad a rad a 56 52 Reference structure Call tr e oc ke ae a ra a ew es 63 5 2 1 Analysis of the reference structure 0 000 a 63 5 2 2 Display of the reference structure o o o eee ee es 64 5 2 3 Display of sub trees of the reference structure ooo o 65 5 2 4 Reference structure in XML format 00 0 0 00005 e aus 65 CONTENTS 5 3 Display of module dependencies oo 65 5 3 1 Display of dependencies for specific modules 000 5 65 5 3 2 Display of module dependencies in XML format 5 65 5 4 Global program analysis 1 0 es 66 5 4 1 Verification of procedure references 2 0000 a 66 5 4 2 Verification of argument lists 1 0 ooo o 66 5 4 3 Verification of common blocks o s as ae rar daada eee ees 66 5 4 4 Verification of modules oaa es 67 5 4 5 Global program cross references noonoo a a 67 5 4 6 Cross references of common block objects aoao 70 5 4 7 Cross references of public module derived typeS o o ooo 70 5 4 8 Cross references of public module data o o 70 5 5 Specification of procedure interfaces ooo o e 71 deal Using FORTRAN 77 Syntax oi ea ra A A a Y 71 3 302 Using Forman GUS YOLAN ccs 2 dnb eS a a ie ia aa 71 5 5 3 Using FORCHECK attributes 22 s 2 6 04 ea os 72 DO a e ri aw Wl ew ae ee hae eo we aE ee Ba a A
73. A 28 Unisys 1100 Fortran 77 extensions Records beginning with or are skipped Though the number of continuation lines is unlimited for the Unisys Fortran compiler FORCHECK can read a maximum of 999 continuation lines DEBUG packets are supported with the restrictions as described for IBM VS Fortran A 29 Watcom Fortran 77 extensions The Watcom compiler interprets a as end of line comment in any column FORCHECK interprets a in column 6 as a continuation character as in Fortran 90 FORCHECK does not support the Watcom include compiler directive A 30 CHANGING THE CONFIGURATION FILE 111 A 30 Changing the configuration file The configuration file is composed of the following sections Sections of the configuration file GENERAL EXTENSIONS INTRINSICS OCI MESSAGES VARIOUS The sections are identified by a header with the section name within brackets In the folow are treated as comment To enable a specific configuration file see the section The usage of language extensions of the chapter Operation mn ing sections each configuration file section is described Lines beginning with A 30 1 GENERAL Mnemonic of the emulated compiler Fortran conformance level The first line specifies the lowest FORCHECK version number which can read this configuration file The next line Mnemonic of the emulated compiler Fortran conformance level specifies the following 1 Mnemonic of the emu
74. APPENDIX A SUPPORTED FORTRAN SYNTAX A 3 TABLE WITH FORTRAN 77 LANGUAGE EXTENSIONS A 3 Table with Fortran 77 language extensions 81 82 APPENDIX A SUPPORTED FORTRAN SYNTAX no PDP VAX VS2 UNI CBR PR CF77 CVX CN OWE WY Rh S S 13 14 15 16 17 18 maxima in lay out max number of characters per line max number of continuation lines max length of names max length of subprogram names max length of common block names type length modifiers INTEGER 1 INTEGER 2 INTEGER 4 INTEGER 8 REAL 4 REAL 8 REAL 16 COMPLEX 8 COMPLEX 16 COMPLEX 32 LOGICAL 1 LOGICAL 2 LOGICAL 4 LOGICAL 8 maximum length of type CHARACTER CHARACTER 255 CHARACTER 511 CHARACTER 16384 CHARACTER 32767 CHARACTER 65280 CHARACTER 65535 CHARACTER 2147483647 default source file name extension default include file name extension include list option delimiter compiler directive string free form continuation character free form 1st column comment char lay out lower case characters debug lines D debug lines A Z tabs formfeeds in line comment after cpp preprocessor directives in line comment after statement separator any character allowed as continuation character names names with names with _ names beginning with built in functions beginning with names with names beginning with _ FTN FTN 132 31 31 3
75. CHECK The manual concludes with a message summary with explanations a glossary references and an index 12 CHAPTER 1 INTRODUCTION Chapter 2 Installation 2 1 The distribution kit The FORCHECK for Windows distribution kit consists of the following components The Integrated Development Environment IDE The FORCHECK analyzer the FORCHECK librarian and the FORCHECK interface builder The FORCHECK integrated development environment IDE Forcheck interface libraries for some Fortran libraries This user and installation guide as a PDF file 2 2 Password protection and support A single user FORCHECK license shall be installed and used on one machine only If more than on user wants to use FORCHECK on one machine you can purchase a multi user license if you wish to install and run FORCHECK on more than one machine you need to purchase more than one FORCHECK license or purchase a site licence To run FORCHECK a password file is required Technical support is provided for registered users only You can enter a maintenance license to get email support and the right to download updates The FORCHECK GUI ForcheckIDE is free software you can redistribute it and or mod ify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 3 of the License or at your option any later version 2 3 Required configuration To install and run FORCHECK for Windows you need at
76. Call tree 63 call tree 35 see reference structure CDIR directive 105 C DIR directive 104 CF77 Fortran 76 CF90 Fortran 77 changing defaults 51 character datum max length 120 CLOSE keyword 116 120 199 200 CM option 43 CN option 18 31 CO option 20 28 33 64 66 67 119 command file 30 command line example 38 max length 120 options 37 command line entry 29 command mode 29 comment 54 103 common block cross reference 62 68 in include file 63 67 max number 120 max number of objects 120 operation code 60 62 problem 46 root 62 size 62 69 specified 62 type 68 unreferenced 34 62 verification 66 common block object cross reference 35 70 in include file 60 max number 120 modified 70 not associated 67 undefined 67 119 unreferenced 34 60 67 Compaq Fortran 77 extensions 104 compiler directive 103 106 108 109 compiler emulation 15 43 51 include file 44 compiler emulation file 44 complete program option 20 28 33 64 66 67 119 compress 42 configuration file 15 75 76 113 116 constant actual argument 66 cross reference 58 INDEX in include file 63 type 58 unreferenced 58 continuation lines option 18 31 Control Data 4000 Fortran 76 extensions 104 Control Data Cyber NOS VE Fortran 76 extensions 105 Convex Fortran 76 extensions 104 CPP option 18 31 cpp preprocessing 104 106 108 110 CR option 36 39 40 Cray Fortra
77. Compiler 0 0 00 eee ee ee 2 13 Specifying default options a lt ac ee m aeara nunana enaa PIP YOUR cira ked A eee E o a Ae te a 2 15 Summary of environmental variables 1 2 0 0 cee ee es Tutorial Sel SOW ets xs cokes Cae Beate Cae eM ee ed ee ee ees Be eee Aes 3 2 Analyzing a single source file i e ee REE Ee ees peel SUPPressing messages acs aww eed we he EE Bow ee Be eh eS 3 2 2 Producing a source listing with cross references o ooo 3 3 Analyzing more than one source file a nononono o 3 3 1 Analyzing all source files in one or more directories 3 3 2 Analyzing your project using a command file 3 4 The progra analysis cinc aa a ee ee ee 3 5 The reference structure or call tree 2 ik oe eo a a di 3 6 The module dependency tre wi sc i Saw ede a a ee es 10 11 13 13 13 13 14 14 14 14 14 15 15 15 15 16 16 16 4 CONTENTS 37 Using brary iles s lt so saca secs aaa RR a ee a a 21 Boe Usima MOTOS i boda ne ee a SS ae Mae Re A SOA eed 21 3 6 1 Using third party libraries c cs eremanen a E 22 3 9 Portability and conformance to standards 0000 o 22 3 9 1 Standard conformance 2 0 ssa cae eA RRR EMER EHR ES Ow E 22 329 2 Compiler emulation ss co eae aika a a ke ee a 22 3 9 3 Setting your own or company standard o o o ooo oo ooo 22 3 9 4 Cross platform development o ooo 23 39 9 Usingincd
78. EAL FUNCTION FUN INQUIRY Arg1 And within a subprogram EXTERNAL FUN INQUIRY PLURI By specifying the PLURI attribute for a procedure interface you can tell FORCHECK not to verify the number of arguments and the argument lists for example REAL FUNCTION FUN PLURT Arg1 Arg2 And within a subprogram EXTERNAL FUN PLURT SUBREF By specifying the SUBREF attribute for a procedure template you can allow a CALL to a function procedure for example REAL FUNCTION FUN SUBREF Arg1 Arg2 And within a subprogram EXTERNAL FUN SUBREF VARYING By specifying the VARYING attribute for a procedure template FORCHECK can allow a varying number of arguments For example REAL FUNCTION FUN VARYING Arg1 Arg2 And within a subprogram EXTERNAL FUN VARYING 5 6 Metrics If a listing file has been requested a table will be presented with some metrics of each program unit and procedure This table shows the number of non comment source lines non blank comment lines statements and maximum construct nesting The number of source lines com ment lines and statements are split up into a total as read in and the number not read from include files In the totals the lines and statements of the include files are counted only once for each include file The program metrics shows the number of program units sub modules subprograms module procedures internal procedures and source files analyzed 5 7 Final report
79. ECK cannot read the mod files as supplied by the vendor because they are proprietary binary files If the source code with the interfaces is supplied by the vendor you can generate a FORCHECK library file containing the interfaces See the section FORCHECK library files of the chapter Operation on how to generate the library file If the interface is not supplied in source code you can compose it from the documentation as described in the chapter Analysis section Specification of procedure interfaces 3 9 Portability and conformance to standards To verify if a program is portable you can instruct FORCHECK to verify if it is standard con forming See the next subsection Standard conformance To make your program suitable for the next Fortran level you can let FORCHECK flag the presence of obsolescent syntax flag ob solescent syntax OB option It is also possible to instruct FORCHECK to accept only those language extensions of a compiler that are available in another Fortran language level This is elucidated in the subsection Compiler emulation 3 9 1 Standard conformance For optimal portability the program should be standard conforming FORCHECK verifies stan dard conformance very precisely when you specify the Fortran standard conformance ST option When this option is applied FORCHECK validates the syntax for conformance to the Fortran standard of the level that is in effect as determined by the compiler emulation chosen
80. ENT IN required for this dummy argument e The arguments of a defined operator function must be defined INTENT IN e The second argument of a defined assignment subroutine must be defined INTENT IN e The arguments of a pure or elemental function must be defined INTENT IN INTENT OUT or INTENT INOUT required for this dummy argument e The first argument of a defined assignment subroutine must be defined INTENT OUT or INTENT INOUT referenced input or input output argument is not defined e The argument was not defined when the procedure was referenced and not defined in the procedure before it was unconditionally referenced conditionally referenced argument is not defined e The argument was not unconditionally defined when the procedure was referenced and it was not defined in the procedure before it was conditionally referenced possibly ref input or input output argument is possibly not defined e The argument was not unconditionally defined when the procedure was referenced and not defined in the procedure before it was referenced e The argument was not defined when the procedure was referenced and was possibly not defined in the procedure before it was referenced dummy function must be specified as entry argument A dummy function must be specified in the argument list of each ENTRY statement from where the function is referenced intrinsic procedure is specific 624 625 626 627 628 629 630 631
81. NCTION statement Therefor besides of a program unit begin ning with a PROGRAM statement a main program will also be detected when e g two consecutive END statements have been specified more than one unnamed BLOCKDATA e Only one unnamed blockdata program unit is allowed multiple definition of BLOCKDATA e The name of the blockdata program unit has already been defined as the name of a blockdata program unit multiple declaration of program unit or entry e The name has been defined already before as a PROGRAM SUBROUTINE FUNCTION or ENTRY name e The name of a program subroutine function or entry name has already been used multiple declaration of statement function entries are not disjoint e There could be transfer of control to the current or other entry blocks no name specified e A procedure sub module or type name is expected 156 510 511 512 513 516 518 519 520 521 APPENDIX D MESSAGE SUMMARY multiple declaration of interface this one ignored explicit interface required invalid subroutine or function reference e A procedure reference is not allowed in this context e The function needs an explicit interface and must not be referenced in this context invalid usage of procedure name e The name of the current subprogram or entry cannot be used as an actual argument e An internal procedure name cannot be used as an actual argument e A procedure name must not be specified in a type d
82. NSIONS no FUJ SG95 SF95 HP95 INT CVF AB95 gfort g95 PATH PGI 94 98 99 101 102 105 106 299 300 301 302 303 304 305 306 307 308 309 310 311 312 320 321 322 323 109 110 112 113 114 115 124 126 127 128 129 131 132 133 134 135 136 99 100 APPENDIX A SUPPORTED FORTRAN SYNTAX no F2003 F2008 Cray NAG XLF DEC FTN95 LF95 MSF I O statements 140 ACCEPT TYPE statement 141 INPUT statement 142 ENCODE DECODE statement O o 143 FIND DEFINE FILE statement o 144 direct access lun record 145 READ PRINT INPUT without format 146 READCKEY REWRITE DELETE 4 147 LOCKING statement 148 UNLOCK statement 4 149 FLUSH statement 4 4 155 NUM in READ 4 156 list directed on internal file 4 4 157 non advancing i o 158 formatted derived type i o 4 4 159 asynchronous i o 4 4 160 stream access i o H 4 4 161 temporary i o mode 4 4 162 IOMSG specifier in all i o statements 4 4 163 namelist i o on internal file 4 4 164 recursive i o 4 4 OPEN CLOSE INQUIRE specifiers 165 RECL for sequential files 4 4 166 RECL not required if STATUS OLD format specifiers and edit descriptors 175 noncharacter array name allowed o o o 176 variable length fields lt gt
83. OJECTLIB FLB and PLOTLIB FLB You can delete compress and list the information of program units in the library file using the utility FCKLIB See the section Maintaining library files 4 9 The usage of modules When FORCHECK encounters a USE statement it must have the public information of the mod ule at hand So FORCHECK needs to analyze the referenced modules before the reference is encountered Therefore FORCHECK analyzes the input files first for USE dependencies and determines the order to analyze the input files The public information of analyzed modules is stored in the specified create or update library If no create or update library has been specified this information is stored in a tempory library file See the section FORCHECK library files for information on how to use library files You could also analyze modules first and store the public information in one or more libraries When analyzing the referencing program units you must specify these libraries 42 CHAPTER 4 OPERATION 4 10 Maintaining library files You can list and remove program units contained in a FORCHECK library file and can compress it When FORCHECK replaces the information of program units it actually stores the new information at the end of the library file and updates the index When you remove the infor mation of program units from the library file the librarian only removes the index entry from the library file To retain the free space from
84. ORTED FORTRAN SYNTAX no F2003 F2008 Cray NAG XLF DEC FTN95 LF95 MSF constants 21 REAL 16 with Q exponent 4 22 named constants in complex constants 4 4 23 Hollerith 4 4 26 X xxx X xxx hex 4 4 28 xxx B xxx B binary 4 4 29 xxx 0 xxx 0 octal H 4 4 30 xxx X xxx X hex 4 4 31 xxx Z xxx Z hex 4 4 32 Oxxx octal 33 Zxxx hex 4 34 xxxB octal 35 xxx hex 36 xxx octal 37 xxx hex 38 radix value 39 radix 50 40 C string xxx C 41 Length modifier suffix B S I 42 C string editing y specification statements 44 STATIC y y 46 AUTOMATIC 4 4 47 BOOLEAN 48 BYTE 4 4 H 49 C EXTERNAL 50 DOUBLE COMPLEX 4 4 H 52 IMPLICIT UNDEFINED 53 IMPLICIT AUTOMATIC STATIC 4 55 integer Cray POINTER 7 4 4 56 LC BC HC MS MSC EXTERNAL 59 STRUCTURE RECORD y 61 VIRTUAL 0 o 62 VOLATILE 4 64 DEFINE 66 DLL_IMPORT DLL_EXPORT 67 C_EXTERNAL Salford STDCALL 68 specif functions in specif expressions 69 type attributes 70 init of var in type spec stmnt 4 71 length modifier after dimension 72 PARAMETER symbol constant 4 73 initialization of structure components 4 108 F95 initialization of structure components 4 77 IMPLICIT mixed with specification stmnts 81 Record fields and rec
85. Opuons ici kG a we ee we ees A 36 4 3 6 Specifying options in command mode o ooo o 37 4 4 Example of FORCHECK command input 0 000 eee eee es 38 a ENSIMA 6 es nie ace eee A alee eee eS eee eee Es 38 46 Aborting PORCHECK soca 46 04 bes eee de See Pee Raw ee ee aw 39 4 7 The usage of include files 2 24 64 6 cea dear e ee a we eS 39 4 8 FORCHECK library files 0 es 39 4 8 1 Using FORCHECK libraries in the IDE o ooo 40 4 8 2 Using FORCHECK libraries in command mode o o oooooo 40 4 9 The usage of MOQU ES ca co do a a a ew a we ee ee 41 CONTENTS 5 4 10 Maintaining library files o ooooo o ee 42 4 10 1 Maintaining library files from the IDE 0 0 0000 ee eee 42 4 10 2 Maintaining library files in command mode o o o ooo oo oo 42 4 11 The usage of language extensions ma 43 4 11 1 Compiler emulation and include files o o ooooooo 44 4 12 Generating Fortran 90 interfaces aaao 45 4 12 1 Operation of INTERF from the IDE sss ek ea a ee 45 4 12 2 Operation of INTERF from the commandline 2005 45 4 13 Storing the Reference structure and dependency of modules 45 o ek ede ecard ioe Sd He he ana ew oe SR ee ek eke a Aiai 46 4 14 1 Operational messages o oo es 46 4 14 2 Analysis Messages icc ace ee ew EE ee ed ee 46 4 14 5 SYSUENLIMESSageS y nce Chae whee ee ee bi beeew
86. Preferences You can set the default include paths using the IDE choose Setup Directories or by edit ing the file FORCHK CFG in the FORCHECK installation directory and specifying the include paths in the INCLUDE line You have to separate multiple include paths by a The default file extension for include files depends on the compiler emulation chosen See the sections on compiler emulations and supported Fortran syntax for more information 4 8 FORCHECK library files FORCHECK stores the global information of all program units in a FORCHECK library file You can save this file for later reference The first time you specify a library file it has to be created using the create library CR option If global program analysis is in effect this is the default all information from the library file is included in the global analysis New or modified program units can now be analyzed and their global information stored or replaced in the library You now specify the library file with the update library UP option If global program analysis is in effect all information from the library will again be included in the global analysis When the global information of the program units of a program has been stored in one or more libraries in this way you can analyze the program units in the context of the entire program by referring to these libraries Now all implicit interfaces are known to FORCHECK and all references of subprograms can be verif
87. Project from the Menu bar and and select New project or you click on the New project toolbar icon A file select box pops up and you can select a directory and enter a filename The default file name extension for a project file is fcp After selecting save the project file will be created and the project view is shown To open an existing project you choose Project from the Menu bar and select Open project or you click on the Open project toolbar icon A file select box pops up and you can select the directory and filename of an existing project file The default file name extension for a project file is fcp After double clicking on the filename or selecting the filename and pressing open the project file is opened and its information is read and shown in the project view You can reopen a previously used project by choosing Project from the Menu bar select Recent projects and pick your choice 4 1 3 Adding files to the project For a new project you now can select the files that belong to the project We distinguish various file categories types The Fortran source files are the input files to be analyzed The default file name extension is user defined see the section Changing default settings from the IDE The second category consists of C source or other nonFortran files that belong to the project They are only needed to generate a suitable Make file The third category consists of Fortran include files You only have to add the
88. S IS or CLASS DEFAULT at invalid IF level TYPE IS CLASS IS or CLASS DEFAULT at invalid CASE level only one CLASS DEFAULT statement allowed in a SELECT TYPE construct missing output item list invalid input output list not allowed e After a command info list no comma must be used e Inan explicit type statement a comma may only be used in a CHARACTER statement after the length specification W invalid usage of parentheses 152 450 451 452 453 454 455 456 457 458 459 460 APPENDIX D MESSAGE SUMMARY e Redundant parentheses are not allowed in an I O list invalid reference of standard unit e OPEN CLOSE ENCODE DECODE BACKSPACE REWIND is not possible on the standard unit list directed I O not allowed e List directed I O is only allowed for sequential I O and not on internal files sequential formatted access expected e Only sequential formatted I O is allowed for internal I O and I O on the standard unit invalid reference of internal file e Only read and write operations can be performed on an internal file e The unit identifier must be a character variable but not a constant or expression possible recursive I O attempt e A function in which I O may occur is referenced in an I O statement unrecognized or unsupported specifier e An unsupported nonstandard Fortran specifier has been detected e The specifier is not supported for this lO statement nonstandard Fortran speci
89. SC26 4222 4 UNISYS 0S1100 ASCII Fortran Programming Reference Manual Relative to Release Level 11R2 UP 8244 4 and UP 8244 4A Unisys Corporation St Paul MN December 1987 Camilla B Haase and Jerry W Ornstein Fortran 77 Reference Guide Translator Family Release T1 0 21 0 DOC4029 5LA Prime Computer Inc January 1988 CONVEX FORTRAN Language Reference Manual Document No 720 000050 203 Seventh Edition CONVEX Computer Corporation October 1988 CONVEX FORTRAN User s Guide Document No 720 000030 203 Eighth Edition CONVEX Computer Corporation October 1988 FORTRAN Version 1 for NOS VE Language Definition Usage Publication Number 60485913 Revision J Control Data Corporation 1988 Domain Fortran Language Reference Document No 000530 A01 Hewlett Packard Co December 1990 Sun FORTRAN Programmer s Guide Part No 800 2163 10 Revision A Sun Microsystems Inc 1988 FORTRAN 9000 Reference HP 9000 Series 300 400 Computers HP Part Number B1688 90600 Hewlett Packard Company 1990 HP Fortran 77 HP UX Programmer s Guide HP Part Number 92430 9004 Hewlett Packard Company 1988 FORTRAN 9000 Reference HP 9000 Series 700 Computers HP Part Number B2408 90001 Hewlett Packard Company 1991 Fortran 90 Programmer s Reference HP Document Number B3908 90002 Hewlett Packard Company 1998 RM FORTRAN Language Reference Manual Version 2 4 Ryan McFarland Corporation 1987 32 33 34 35
90. UCTURE OR CALL TREE 21 undefined common block objects unreferenced modules unreferenced and undefined pub lic module procedures operators and data are flagged See also the section Verification of common blocks and Verification of modules of the chapter Analysis If not all procedures are available you can make the interface available see the section Specification of procedure interfaces of the chapter Analysis 3 5 The reference structure or call tree FORCHECK can present the call tree in the listing file or store it in xml format so you can browse and use it for further analysis or documentation Though FORCHECK does not display needless repetitions the call tree may take wallpaper proportions You can however specify one or more root nodes from where you would like to see the call tree show reference structure SRS show reference structure SRS r for the roots specified If the analyse reference structure AR option is in effect FORCHECK also analyses the tree Now procedures that are referenced recursively but are not declared as such or declared re cursively but not referenced recursively are spotted Unsaved common blocks and module variables which are not specified in the root of the referencing program units are reported From Fortran 2008 on saving is the default and most compilers will store those objects stati cally However in earlier levels of the standard it is not standard conforming and a potential
91. a FORCHECK library file first and to analyze this library file repeatedly 5 4 7 Cross references of public module derived types Cross references of public module derived types are displayed if a listing file has been requested and the show public module derived types SMT is in effect All public derived types of each module for which a cross reference table is requested are listed with all subprograms in which the derived type is used If a derived type is used in one or more module procedures of the module in which the derived type is used the module name is listed instead of the these individual module procedures Because the amount of information can be huge if you have many modules with many public derived types FORCHECK s internal tables can easily become full In that case you have to split up the process in several runs in which you request the cross references of the derived types of a limited number of modules at a time The optimal procedure is to compose a FORCHECK library file first and to analyze this library file repeatedly 5 4 8 Cross references of public module data Cross references of public module data are displayed if a listing file has been requested and the show public module data SMV is in effect All public constants and variables of each module for which a cross reference table is requested are listed with all subprograms in which the module constant or variable is used If a module constant or variable is used
92. a common block object is inconsistently specified compared to the first reference encountered One has the default length the other has an explic itly specified type length type length inconsistent with specification e type length of an actual argument is inconsistently specified compared to the speci fication of the procedure One has the default type length the other has an explicitly specified type length result of procedure must be scalar storage association conflict with object with the TARGET attribute e An object with the TARGET attribute may become storage associated only with an other object that has the TARGET attribute and the same type and type parameters explicitness of dummy proc argument inconsistent with first occurr e If the interface of a dummy procedure argument is explicit in one instance it must be explicit in each instance 170 695 696 698 699 700 701 702 703 704 705 706 707 708 709 710 APPENDIX D MESSAGE SUMMARY no defined assignment supplied for this type e If a defined assignment for one or more of the derived type components is present you must supply a defined assignment for the type entity is not an accessible entity in the host scoping unit name not explicitly typed implicit type assumed e The object has not been explicitly typed and e IMPLICIT NONE has been specified implicit conversion to more accurate type implicit conversion of real
93. ameters invalid usage of type parameters already specified in host context unsupported type length default assumed e A type length specification of this type is not supported by the emulated compiler type length invalidly specified e The type length cannot be specified in this context e The emulated compiler does not support this nonstandard Fortran syntax initialization only allowed in attributed form of type spec e Use between statement keyword and list a named constant cannot have the POINTER TARGET or BIND attribute constant expected missing parentheses e In standard Fortran the list of a PARAMETER statement must be enclosed in paren theses Be aware however that the syntax extension without parentheses provided by some compilers uses a different assumption of the type of named constant In standard Fortran the type is the implicitly or explicitly defined type of the name In the syntax extension the type becomes the type of the named constant constant expression missing e If the PARAMETER attribute has been specified the named constant must be given a value entity must have been declared previously multiple specification of type this one ignored e The entity has already been typed by an explicit type statement name invalidly typed e The name must not appear in an explicit type statement implicit type already used change sequence 205 E 206 E 207 E 208 W 209 W 135 e An explicit typ
94. an variables have been found in this data statement list more variables than constants e More variable elements than constants have been found in this data statement list more than once initialized in DATA or type statement no expression allowed invalid type or type length for an integer POINTER W assumed length character functions are obsolescent e This is marked as obsolescent in the Fortran 95 standard object already used change statement sequence e An explicit specification of an attribute confirms the attribute of an object that has already been used 140 249 250 252 253 254 255 256 258 259 260 APPENDIX D MESSAGE SUMMARY W list of objects in blank COMMON inconsistent with first declaration e In this occurrence of the blank common block objects with different types type lengths or array sizes have been stored than in main or in the first occurrence encountered when referencing modules implicit typing is potentially risky e There is an increased potential for undetected errors in a scoping unit that uses both implicit typing and the USE statement because module objects can be typed differently from the implicit type SAVE has already been specified for each entity in this scoping unit a private object must not be placed in a public namelist group e If anamelist group name has the PUBLIC attribute no object in the namelist group object list shall have the PRIVATE attribute or have pr
95. and remove add or change the nonstandard intrinsic procedures to be recognized Not all specific names of each generic procedure are specified in the various con figuration files because in general there is no need to use these names FORCHECKcan accept added intrinsic functions which are standardized in a higher Fortran standard level than the Fortran conformance level as specified in this configuration file without reporting You can group the added intrinsic functions for each language level Each group must have one of the following headers Fortran 90 additions IFortran 95 additions IFortran 2003 additions IFortran 2008 additions The nonstandard compiler specific additions must be in a group with the following header Nonstandard additions If you specify e g Fortran 2003 conformance F03 only the intrinsic functions which are not in the Fortran 2003 standard are reported In the next paragraphs we describe the way intrinsic procedures can be specified in the configuration file The properties of intrinsic procedures are very divers and hard to specify in a general way covering all implementations Moreover the various Fortran language reference manuals describe the intrinsic functions each in their own way from which it is often hard to discover the system behind the generation of specific functions from generic functions Therefore it is not an easy task to specify additional intrinsic procedures in the configuration file However
96. and undefined common block objects un referenced modules unreferenced and undefined public module variables unreferenced pub lic module constants and unreferenced public module derived types If the analyse reference structure AR option and the rigorous syntax analysis RI option are also in effect the call tree will be traversed to detect unsaved common blocks and modules with unsaved public data 34 CHAPTER 4 OPERATION which are not specified in the root of referencing program units See also the sections Analysis of the reference structure Verification of common blocks and Verification of modules of the chapter Analysis Default NOCO verify program AP Analyse the the global program If this option is not in effect only the individual program units are analyzed See the section Global program analysis Default AP analyse reference structure AR Analyze the reference structure call tree See also the section Analyzing the reference struc ture of the chapter Analysis Default AR 4 3 3 Listing options page length PL p Place a maximum of p lines on a page p gt 20 By default the IDE automatically takes the value from the page setup characteristics Default for the command line version PL 62 page width PW w Place a maximum of w characters on a line 60 lt w lt 255 By default the IDE automatically takes the value from the page setup characteristics Default for the command line
97. are defined as long as the 56 CHAPTER 5 ANALYSIS statements are executed sequentially or if the rigorous syntax analysis RI option has been enabled If the rigorous syntax analysis RI option is in effect FORCHECK informs you if the entry blocks are not disjoint that is to say if paths from one ENTRY statement and another coincide This is relaxed for an ENTRY statement which follows the specification statements immediately 5 1 7 Fortran intrinsic procedures For each reference of a Fortran intrinsic generic function FORCHECK generates a specific func tion according to the data type and data type kind and length of the arguments The name of the generated specific function is inserted in the cross reference table of referenced procedures FORCHECK does not need to recognize all specific functions of every compiler because you should use preferably the appropriate generic function Only for type conversion of actual arguments you may need specific functions which are supplied FORCHECK can flag each intrinsic function which has not been declared intrinsic by spec ifying the flag undeclared intrinsic procedures INTR option By specifying the flag specific intrinsic procedures SF option you can flag each specific intrinsic function used 5 1 8 Function procedure If the function performs external i o de allocates memory contains a STOP or PAUSE state ment modifies any argument common block object or saved item and the
98. as a tree of all files belonging to the project To add source files to the project select fortran source then right click and select Add file s or choose Add files in the toolbar A file select box pops up and you can select and open the source files of choice You may need to specify some options to indicate the source format Select Options Project options from the Menu bar The Project options window appears and you can check the re quired options The source format options are analyze all columns AC Analyze all columns of the source input records beyond column 72 for fixed source form maximum number of continuation lines CN Allow a maximum of c continuation lines in a statement If not specified the maximum is that as specified in the chosen config uration file enable cpp preprocessing CPP cpp preprocessing is automatically invoked for source files with a filename extension of FPP free source form FF Source code input is in free source form This is the default for source files with a filename extension of F90 F95 FO3 or FO8 define symbols DF s Define meta symbols for conditional compilation The items in the wow list must be separated by a include path IP p Specify include directories The items in the list must be separated by as You now can start the analysis by clicking on the Analyse all files tool bar icon The F check full icon The FORCHECK analyzer will be started and t
99. at consists of an arithmetic expression followed by a relational operator followed by another arithmetic expression or a character expression fol lowed by a relational operator followed by another character expression The result is a value that is true or false relational operator Any of the set of operators GT GE LT LE EQ NE saved Variables records Fortran 77 extension and named common blocks can be saved by specifying them in a SAVE statement to prevent them from becoming undefined after exit of a subprogram scalar A single datum that is not an array and is not a record Fortran 77 extension or aggre gate field Fortran 77 extension scale factor A specification in a FORMAT statement which changes the location of the decimal point in a real number scope That part of a program within which a lexical token has a single interpretation It may be a program a scoping unit a construct a single statement or a part of a statement scoping unit One of the following A program unit or subprogram excluding any scoping units in it a derived type definition or an interface body excluding any scoping units in it scratch file An external file in which temporary information is stored 195 size The size of an array record Fortran extension derived type or common block is the total number of bytes that make up the entity source code The original text which forms FORTRAN statements source code
100. ber of arguments data types and data type kind and length must correspond When an argument is a scalar at one reference the argument cannot be an array name at another reference In that case the message array versus scalar conflict will be presented An array element as actual argument is compatible with both an array name and a scalar In that case the first occurrence other than an array element determines the expected argument type of the referenced procedure If array shapes differ and the rigorous syntax analysis RI option is in effect you are informed For argument lists of dummy functions and subroutines all these checks are relaxed and only informative messages will be presented Only the explicit interface specified or the first argument list of an implicit interface aug mented with type information as described of each reference will be stored to be used in the global program analysis 5 1 6 Verification of procedure entries FORCHECK verifies the dummy formal argument list of each individual ENTRY statement of a procedure Unreferenced dummy arguments are flagged If a dummy procedure name is used after an ENTRY statement it must be present in the argument list of that ENTRY statement Arguments that specify the dimension of adjustable arrays must be present in each ENTRY argument list in which the name of the adjustable array occurs After each ENTRY statement FORCHECK will detect variables which are referenced before they
101. cated two numeric storage units 8 bytes DO variable A variable specified in a DO statement that is initialized or increased prior to each execution of the statement or statements within the DO range dummy argument An entity whose name appears in the parenthesized list following the pro cedure name in a FUNCTION SUBROUTINE ENTRY or statement function statement formal argument dummy array A dummy argument that is an array dummy pointer A dummy argument that is a pointer dummy data object A dummy argument that is a data object dummy procedure A dummy argument that is a procedure entity The term entity is used for any of the following a program unit a procedure an ab stract interface an operator a generic interface a common block an external unit a statement function a type a data entity a statement label a construct or a namelist group entry The location in the subprogram where execution of the statements starts when the entry name is referenced equivalence The association of names referring to the same memory location equivalence list A list of names to be associated 189 executable statement An instruction to perform or control one or more computational ac tions exit status The resulting error level of the execution of a program explicit interface For a procedure referenced in a scoping unit the property of being an inter nal procedure a module procedure an intrinsic procedure a
102. cation data directory and specify the configuration file in the FCKCNF line When using the commandline set the environmental variable FCKCNF for ex ample SET FCKCNF C FORCHK g95 cnf When you start the analysis you will now get the message FCK g95 compiler emulation In the appendix Supported Fortran syntax of the user guide the supported compilers are listed For each of the supported compilers a compiler emulation file is supplied The filenames of the compiler emulation files have the extension cnf When using the IDE the default source file name extension can be changed by selecting Options Preferences Extensions In the appendix Supported Fortran syntax the supported language extensions are listed When you want to enable different language extensions than the default you have to make a copy of the appropriate compiler emulation file and delete or add lines for the specific language extensions You can find the numbers of these extensions in the appendix Supported Fortran syntax You also can verify if the Fortran syntax extensions of the emulated compiler are accepted by a higher Fortran level E g when specifying the Fortran 2003 conformance F03 option FORCHECK flags all deviations from the Fortran 2003 standard 4 11 1 Compiler emulation and include files When you analyze a Fortran source program on a host computer the INCLUDE lines must be processed by FORCHECK and the include files must be opened and read on the
103. choose Project Execute makefile from the Menu bar or click on the Execute makefile Toolbar icon 4 2 USING FORCHECK IN COMMAND MODE 29 If the configuration and dependencies have not been changed you can choose the makefile by selecting Project Select makefile 4 2 Using FORCHECK in command mode The FORCHECK analyzer can be started from a command window or by double clicking on the FORCHECK Command Line icon Command input can be entered in three ways interactive entry command line entry and response file entry 4 2 1 Using Forcheck in interactive mode If you type the FORCHK command without any argument FORCHECK prompts for each argu ment a listing filename source input filenames and library files By default no listing file will be generated In this case all messages will be sent to your screen This is suitable for a quick check of one or more program units The default file name extension is 1st If you want to create a listing on your screen type CON For a listing on your printer type PRN LPT1 LPT2 or LPT3 Next you are prompted to specify the source input files to be analyzed You can specify as many source input files as you like separated by a sign If you end the command line with a plus sign FORCHECK prompts for more input files Every file specification may include a device name and directory The source input file specifications may contain wild cards you can for example specify FOR to analyze all Fo
104. cified both invalid to save this entity e Only named common blocks and variables can be saved e There is no need to save the blank common because the common block values in blank common do not become undefined after a RETURN or END 136 213 E 214 E 215 E 216 E 217 E 218 E APPENDIX D MESSAGE SUMMARY Common block objects cannot be saved Automatic and static arrays and pointees cannot be saved Local variables of pure procedures must not be saved SAVE or BIND specified but entity not declared A variable or common block has been specified in a SAVE or BIND statement but has not been declared or used not saved If a common block has been specified in a SAVE statement in a subprogram it must be specified in a SAVE statement in every subprogram in which the common block has been specified If an object of a type for which component initialization is specified appears in the specification part of a sub module and does not have the ALLOCATABLE or POINTER attribute the object must be saved An object in an initial data target must be saved already specified automatic static or allocatable An object must only be specified automatic static or allocatable once AUTOMATIC and STATIC cannot be specified both invalidly specified automatic static or allocatable A dummy variable a common block object and a pointee must not be specified automatic static or allocatable An allocatable array must not be
105. ctory the subdirectory forcheck of the APPDATA directory 38 CHAPTER 4 OPERATION and specifying these options in the FCKOPT line For example FCKOPT PL 66 PW 100 F77 4 4 Example of FORCHECK command input Example of FORCHECK command input C gt FORCHK FORCHECK V14 0 0 Copyright c 1984 2009 Forcheck b v All rights reserved INT compiler emulation listing file LST with global options FILOUT F77 NOSH input file s FOR with local options TSTPRG SUBR1 SUBR2 NOF77 AC input file s FOR with local options SOURCE SUBR NOSB library file s FLB with options In this example FORCHECK analyzes the program consisting of the files TSTPRG FOR SUBR1 FOR SUBR2 FOR and all FOR files from the directory SOURCE with names beginning with SUBR Nonstandard FORTRAN 77 syntax is flagged Listings with cross references are gen erated for all input files but SOURCE SUBR FOR The statements of include files are not listed All columns of the input records of the file SUBR2 FOR are analyzed The listings and cross references are stored in the file FILOUT LST No library files will be saved or referenced 4 5 Exit status The FORCHECK analyzer exits with a specified exit status which can be tested in for example a batch job Exit status O no informative warning overflow or error messages presented informative but no warning overflow or error messages presented warning but no overflow or error messages pr
106. d label assigned to dummy argument or variable in COMMON e It is unsafe and not functional to use a global variable to denote a label both a numeric value and label assigned to this variable e The variable is used both to denote a label and a numeric value This is potentially unsafe no value assigned to this variable 144 313 314 315 316 317 318 319 APPENDIX D MESSAGE SUMMARY e The variable is referenced but no value has been assigned to the variable an element of the array a component of the structure or a field of the record e The variable is a dummy output argument but no value has been assigned to it possibly no value assigned to this variable e The variable has been referenced in an expression but if statements are executed sequentially no value has been assigned to the variable There might be however a path through which the variable is defined before referenced e A dummy argument is referenced but it is not a dummy argument in all entries through which this statement can be reached possible change of initial value e A variable has been initialized in a DATA statement or explicit type specification statement and a new value has been assigned to it For a scalar of intrinsic type this means that the initial value has been superseded permanently For an array or a variable of derived type this means that the value of one or more elements or components might have been superseded redefined
107. d Module dependencies in XML format of the chapter Analysis 46 CHAPTER 4 OPERATION 4 14 Messages We distinguish three kinds of messages viz operational messages analysis messages and system messages 4 14 1 Operational messages Operational messages are generated when a problem occurs during the operation of FORCHECK They are of the form FCK For example FCK open error on input or include file For many operational messages an i o status code is presented This code is system dependent and is provided for debugging purposes only When reporting problems to the FORCHECK support team please specify the message and the i o status code Operational messages are sent to the report file and to your screen or log file Analysis messages and system messages are sent to the report file and to the listing file if specified or to your screen or log file otherwise The next sections apply to analysis messages and system messages respectively 4 14 2 Analysis messages Those analysis messages flagged with an T are informative with a W flagged with an E are errors Informative messages hold no conflicts with the Fortran standard Warnings indicate the usage of extensions to the standard Error messages will arise when the Fortran standard has been violated are warnings those The distinction between warnings and error messages however is not principal In general we can say that warnings indicate construction
108. d FORCHECK can verify the references while compiling or analyzing the program unit 4 12 1 Operation of INTERF from the IDE To generate an interface select Tools Interface builder You now can select a FORCHECK library file as input and a fortran source file as output file INTERF places the module with interfaces in the fortran source output file 4 12 2 Operation of INTERF from the commandline The command line has the following form INTERF libraryfile options where libraryfile is the name of the FORCHECK library file in which the information of the program units is stored Outputfile is the name of the file in which the generated module with the interfaces will be stored The default suffix is f The following options can be specified BA Exit if errors during command input When FORCHECK is started from a batch file this option suppresses interactive handling of command input errors HE Present help information on screen LI 1 Place the module with the interfaces in the file 1 4 13 Storing the Reference structure and dependency of mod ules Beside presenting the reference structure call tree and the dependency of modules in the listing file FORCHECK can store the reference structure and the module dependencies in XML format in separate output files by specifying a filename in the IDE or enabling the reference structure and module dependencies file options See also the subsection Reference structure in XML format an
109. d in an include file or a referenced module are listed These derived types are not used and can therefore be removed from the program unit without affecting the operation of the program Constants The cross reference table of named constants displays the following information The name of the constant The type see entries The nondefault type kind and length The rank of array valued constants The size the constant occupies The line or statement numbers of all occurrences of the name of the constant The line or statement number at which the constant is defined is flagged with a Only when the list unreferenced items SI option is in effect all unreferenced constants which have been specified in an include file or module are listed For types of named constants see the section on entries Unreferenced constants are listed except those which are defined in an include file or refer enced module These constants are not used and can therefore be removed from the program unit without affecting the operation of the program To get an idea of its size FORCHECK presents the total size of the referenced named constants 5 1 PROGRAM UNIT ANALYSIS 59 Variables The cross reference table of variables displays the following information The name of the variable The type see entries The nondeafult type kind and length The rank of arrays The size the variable occupies The operation codes The
110. d in this context procedure attributes not allowed in this context delimiter not allowed in this context statement only allowed in a non separate interface body explicit or abstract interface required this intrinsic function not allowed as interface name TYPE IS CLASS IS or CLASS DEFAULT expected after SELECT TYPE associate name expected association list missing selector missing invalid assignment the selector must be polymorphic passed object dummy argument not found incorrect number of derived type parameters invalid argument kind type parameter for intrinsic procedure e The kind type parameter of the argument of a specific procedure is incorrect e No specific procedure could be generated of which the argument kind type param eter matches the actual argument type kind e A specific procedure has been generated with an argument kind type parameter which matches the argument type kind of the first argument but the type kind of one of the other arguments do not match type kind or length inconsistently specified e The type kind or length of the argument is explicit the type kind or length of others is default or specified as DOUBLE PRECISION e The type kind or length of this object in one instance of the common block is explicit the type kind or length in the others is default or specified as DOUBLE PRECISION each element in an array constructor must be of the same kind element kind inconsistent with kind of
111. dard Fortran specifier logical T The keyword is a standard Fortran specifier F The keyword is no standard Fortran specifier A 30 5 MESSAGES In the section messages you can redefine messages You specify the numbers of the messages which you want to suppress or of which you want to change the severity Each message number followed by the severity level flag within apostrophes must be specified on a single record See the section The usage of language extensions of the chapter Operation for a precise description You also can specify suppress al1 to suppress all diagnostic messages A 30 6 OUTPUT In this section you can specify what information is sent to stdout is stored in the listing file and in the report file See the section Tuning the output of the chapter Operations A 30 7 VARIOUS In this section you can specify the count mode the format of the message reporting and the date time format See the corresponding sections of the chapter Operations Appendix B Limitations FORCHECK is a static analyzer therefore it cannot detect any errors which manifest themselves at run time only For example a variable array index or variable character substring expression which is out of bounds cannot be detected Likewise the detection of operations on external files can hardly be checked without executing the program For example a file which has not been opened before usage or a variable logical unit not being used
112. declaration must confirm this type conflict with generic name conflict with derived type name invalid usage of subscripts or substring already specified PUBLIC e PUBLIC has already been specified e PRIVATE has been specified but PUBLIC has been specified before name already in use invalid usage of variable e Because of the previous context the name appeared to be a variable but is now used in a context where a procedure name is expected scalar variable name expected e An array element array name constant external structure derived type name or namelist name is not allowed in this context named scalar expected e No array name array section array element substring or expression is allowed in this context no array allowed e No array name or array section allowed 132 164 165 166 168 169 170 171 172 173 174 175 176 APPENDIX D MESSAGE SUMMARY missing array or shape specification invalid shape specification missing array subscripts invalid usage of subscripts or bounds e An array element is not allowed in this context e A scalar can not be subscripted or have bounds invalid number of subscripts or bounds e The number of subscripts is larger than the maximum rank e The number of subscripts or bounds is different from the declared rank The number of lower bound expressions or bound remappings is different from the declared rank invalid shape bounds e The fi
113. deferred coshape specification not allowed deferred coshape specification required array pointer or assumed shape array expected actual argument must be a contiguous array entity cannot be a coarray type not allowed for an INTENT OUT argument a coarray cannot have the POINTER attribute invalid usage of coindex or image selector invalid number of cosubscripts missing coshape specification SAVE without entity list invalid in a BLOCK construct input or input output argument is not defined 839 840 841 842 843 844 845 846 847 848 849 850 853 854 855 856 858 859 860 177 e The argument was defined as an input or input output argument and was not de fined when the procedure was referenced e The argument was not or conditionally referenced before defined in the procedure and was not defined when the procedure was referenced incorrect usage of coindexed object target has invalid rank module object not used outside the module e The object can be decalred PRIVATE component must have the POINTER and or ALLOCATABLE attribute statement not allowed within a CRITICAL or DO CONCURRENT construct e A RETURN or an image control statement is not allowed within a CRITICAL or DO CONCURRENT construct no corresponding CRITICAL statement found missing END CRITICAL a coarray cannot not be de allocated within this construct e A coarray cannot be de allocated within a CRITICAL or DO CONCURRENT const
114. e One has the default kind the other has an explicitly specified kind e The type kind of an actual argument is inconsistently specified compared to the first reference encountered One has the default kind the other has an explicitly specified kind The type kind of a common block object is inconsistently specified compared to the first reference encountered One has the default kind the other has an explicitly specified kind type kind inconsistent with specification e The type kind of an actual argument is inconsistently specified compared to the specification of the procedure One has the default kind the other has an explicitly specified type kind 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 175 e The type kind has been specified in one instance the type length in the other invalid usage of abstract type invalid overriding of binding component name not unique component not defined the derived type must be extensible entity cannot be an explicit shape array INTENT not allowed for nonpointer dummy procedure arguments entity cannot have the POINTER attribute entity cannot have the PROTECTED attribute dummy argument with assumed type parameter expected dummy argument must not be an elemental procedure invalid specification of shape named language binding not allowed multiple declaration of procedure derived type name expected list of typ
115. e cross reference 35 70 INDEX module procedure type code 61 module variable modified 71 undefined 34 NagWare f90 Compiler 77 NagWare f95 Compiler 77 NagWare nagfor compiler 77 name 78 length 104 name table length 120 namelist cross reference 61 namelist group 61 NASoftware Fortran Plus 77 NDP Fortran 76 extensions 109 nolist 103 OB option 22 33 43 54 79 obsolescent option 22 33 43 54 79 OPEN keyword 116 120 operation 25 using the IDE 25 operation code array 59 common 62 equivalenced 60 external file 63 69 procedure 59 record 60 subprogram 59 variable 59 operator cross reference 62 OPTIONS 104 105 108 109 options 30 command line 37 default 16 27 37 51 example 38 file 27 global 37 global analysis 33 205 input file 37 library 36 37 listing 34 37 local 37 miscellaneous 36 negation 37 program unit analysis 31 project 27 output operation code 60 output tuning 49 overflow exit status 38 page length option 34 page number 54 67 page width option 34 PARAMETER 78 password 14 PathScale Fortran 77 PDP 11 Fortran 77 105 extensions 105 PL option 34 Portland Group Fortran 77 preprocessing option 18 31 preprocessor directive 104 Prime Fortran 77 76 extensions 109 print 28 procedure actual argument 55 common block 68 cross reference 61 68 external file 69 interface 71 intrinsic 56 no
116. e FORCHECK integrated development environment double click on the ForcheckIDE icon You now see The menu bar with pull down menus The toolbar with icons for taking certain actions quickly The project view A window for viewing and editing files A toolbar for search and replace A report window The status bar You can also start the FORCHECK analyzer from a command window or from the start menu without using the IDE This might be of interest for experienced FORCHECK users and for batch processing See the section Using FORCHECK in command mode 4 1 1 The project view To analyze Fortran source files you first must create a new or open an existing FORCHECK project You group Fortran source files additional C source files include files library files a listing file report file and reference structure file into a project The additional C source files are only in the project to be able to generate a Make file Now you can choose FORCHECK options to be applied for the project Additionally you can select specific FORCHECK options for each separate Fortran source file which overrule the selected project options The project can now be saved Beside performing a complete analysis of all the source files in the project you can carry out a quick analysis on one or more specific source file s of the project 25 26 CHAPTER 4 OPERATION 4 1 2 Creating and opening a project You create a new project by choosing
117. e bound procedures not allowed e In Fortan 2003 a list is not supported invalid usage of unlimited format item scalar default integer or character constant expression expected could not determine type parameter invalid coarray specification ENTRY within a FORALL construct NULLO expected NULL or procedure name expected TYPE IS CLASS IS or CLASS DEFAULT at invalid SELECT TYPE level invalid argument value derived type component not used e None of the objects of the type uses this component derived type component not referenced 176 814 818 819 820 822 823 824 827 828 829 830 832 833 834 835 836 838 APPENDIX D MESSAGE SUMMARY e None of the objects of the type references this component derived type component not defined e None of the objects of the type defines this component derived type component not allocated e None of the objects of the type allocates this component derived type component not associated e None of the objects of the type associates this component incorrect type for a coarray cannot extend parent type nonpointer nonallocatable scalar expected array with the POINTER attribute expected target must be contiguous missing coarray specification function result cannot be a coarray type of function result must not have a coarray ultimate component a coarray must be a dummy argument allocatable in main or saved must be a dummy argument or saved
118. e directories determine the search path to locate include files See the section The usage of include files for the search strategy which FORCHECK uses to locate include files 4 18 3 Default file name extensions Here you can change the default file name extensions for project source library listing report and reference structure files 4 18 4 Compiler emulation Here you can choose the compiler you want FORCHECK to emulate See the section The usage of language extensions for a detailed description 4 18 5 Editor By default the Forcheck IDE uses its build in text editor By choosing Options Preferences Editor you can specify an editor of your own choice 4 18 6 Build setup Here you can specify the default settings for generating a make file and the build utility which is activated when you press Make on the toolbar or choose Project Execute makefile from the menu If you leave the build utility field empty build assumes a batch file To generate a make 52 CHAPTER 4 OPERATION file choose Project Configure and generate make file The make or batchfile which will be executed can be specified under Project Set makefile 4 18 7 Source line statement numbering By default FORCHECK numbers each source input line sequentially Lines in include files are numbered in an hierarchical way Line numbering starts anew for each input file In this way you can use your editor to locate the lines of interest in the easiest way By selec
119. e kind type parameter 348 349 350 352 353 354 355 356 358 359 360 364 365 366 368 369 147 invalid usage of logical operator invalid usage of relational operator invalid mixed mode expression invalid usage of operator nonstandard operator undefined operator invalid concatenation with character variable of assumed length e In Fortran 77 concatenation with a character variable of assumed length is only allowed in a character assignment statement array section specification invalid for assumed shape array e The second subscript of a subscript triplet of an array section must not be omitted for an assumed shape array array section specified incorrectly no array section allowed in this context invalid stride array has invalid rank each element in an array constructor must be of the same decl type each element in an array constructor must have the same type length vector valued subscript not allowed in this context array does not conform to expression other arguments or target e The rank or shape of the argument differs from that of the other arguments of the intrinsic procedure reference e The rank or shape of the expression differs from that of the left hand side of an assignment statement arrays do not conform e The rank or shape of the operands in an expression differ only nonproc pointers and allocatable variables can be de allocated defined assignment not allowed in this
120. e of outer WHERE construct e If a WHERE construct contains a WHERE statement a masked ELSEWHERE statement or another WHERE construct then each mask expression shall have the same shape none of the equivalenced variables of the same type defined e The variable is referenced but the variable and none of the equivalenced variables with the same type are defined none of the equivalenced variables of the same type referenced e The variable is defined but the variable and none of the equivalenced objects with the same type are referenced truncation of character constant expression 384 385 386 388 389 390 392 393 394 395 396 398 399 400 401 402 403 149 e The type length of the variable is shorter than the resulting type length of the ex pression truncation of character variable expression e The type length of the variable is shorter than the resulting type length of the ex pression invalid usage of construct name construct name expected non matching construct name e The construct name does not match the name of a construct invalid construct nesting invalid statement in logical IF e A statement in a logical IF must be executable but no IF ELSEIF ELSE DO or END ENTRY within an IF construct too many ENDIF s ELSE must be between IF and ENDIF missing ENDIF s THEN missing invalid sequence of ELSEIF and ELSE ELSEIF ELSE or ENDIF at invalid DO level
121. e specific functions and subroutines in a generic procedure Some compilers allow this as a syntax extension defined operator procedure must be a function defined assignment procedure must be a subroutine no matching intrinsic or specific procedure found no procedure interfaces specified in interface block recursive reference e A function is referenced recursively while recursive functions are not supported in the Fortran language level specified e A module is referenced circularly possible recursive reference e A path has been detected through which the procedure may reference itself function is impure e An argument and or common block object is being changed in this procedure e A local variable is saved e Anon local variable is changed in this procedure e A variable is initialized in a type or data statement type conflict with type of function e All entries within a character function must be of type character e The type specified when referencing the function differs from the specification of the function type length conflict with type length of function e All entries within function must have the same type length e The type length while referencing the function differs from the specification of the function type of function inconsistent with first occurrence e The type of the function differs from that at the first reference encountered 158 335 536 538 539 540 541 542 543 544
122. e specification confirms the implicit type of a variable that has already been used implicit properties already used statement out of order e An explicit type specification defines the type of a variable that has already been used e An implicit statement defines the type of an entity while the implicit type of the entity has already been used An IMPLICIT ALL compiler directive has been specified while the implicit type of one or more entities has already been used e A shape specification defines the shape of a variable or function that has already be used as a scalar invalid implicit range e The first and second character in an IMPLICIT list must in lexicographic order multiple implicit type declaration this one ignored e An implicit type has been specified more than once for one or more characters in the list e IMPLICIT NONE has been specified and another IMPLICIT statement has already been specified e IMPLICIT NONE has been specified but an implicit type has already been used name not explicitly typed implicit type assumed e The entity has not been explicitly typed and e IMPLICIT UNDEFINED has been specified for the first character of the symbol e The declare option has been specified conflict with IMPLICIT NONE specification or option e An IMPLICIT statement has been specified while IMPLICIT NONE has been specified or enabled SAVE has already been specified for this entity SAVE and AUTOMATIC cannot be spe
123. e type I module nature is intrinsic N module nature is non intrinsic S submodule 70 CHAPTER 5 ANALYSIS Cross reference of include files For each include file all program units which contain that include file are presented 5 4 6 Cross references of common block objects Cross references of common block objects are displayed if a listing file has been requested and the show common SC option is in effect All objects of each common block for which a cross reference table is requested are listed with all subprograms in which the common block object is used A in front of a subprogram name indicates that the common block object is re defined directly in that subprogram Mind that if a common block object is used as an actual argument in a subprogram the common block object may be re defined indirectly A cross reference of common block objects is only meaningful if the lists of objects at the various occurrences of that common block are identical If acommon block object is defined and referenced in a single subprogram only the object could be replaced by a local variable or record Because the amount of information can be huge if you have many common blocks with many objects FORCHECK s internal tables can easily become full In that case you have to split up the process in several runs in which you request the cross references of the objects of a limited number of common blocks at a time The optimal procedure is to compose
124. eclaration statement with a language binding subroutine function conflict e The procedure is referenced as a subroutine but has been referenced or defined as a function before e The procedure is referenced as a function but has been referenced or defined as a subroutine before invalid subprogram type invalid usage of EXTERNAL e A procedure name as specified in an EXTERNAL statement cannot be used at the left side of an assignment statement or as a statement function procedure actual argument must be declared EXTERNAL or INTRINSIC e A procedure name used as an actual argument must be declared EXTERNAL or INTRINSIC referenced procedure not declared EXTERNAL name of external procedure is same as module procedure name external or dummy procedure expected e The interface of the containing subprogram must not be specified in an interface block e The interface of an internal or module procedure must not be specified in an inter face block invalid usage of generic name e The generic name of a procedure cannot be used as an actual argument Use the appropriate specific name 522 E 523 E 524 W 525 E 526 E 528 529 E 530 W 532 E 533 E 534 E an interface with module procedure statements must be generic procedure already in list of specific procedures of this interface mixing of subroutines and functions in generic interface not allowed e The Fortran standard does not allow to combin
125. ed as separator in the actual presentation e g date_format yyyy mm dd date_format mmm dd yy date_format dd mm yyyy time_format hh mm ss time_format h mm ss If you use an x as the format character the date and or time will be suppressed in the listings This can be usefull if you want to compare listings of different FORCHECK runs e g 4 18 CHANGING DEFAULT SETTINGS FROM THE IDE 51 date_format xx XX xx time_format xx XX xx When using the IDE you can choose the format by selecting Options Preferences Date time Format 4 18 Changing default settings from the IDE The installation defaults can be changed by selecting Options from the menu bar By selecting this menu you can change the default behaviour of the IDE and set preferences The following preferences can be set Directories default file name extensions the emulated compiler the editor of choice the way lines or statements will be numbered the date format the format and severity level of messages and the default data to build the project For changing the date format see the section Date format For redefinition of FORCHECK analysis messages see the section Redefinition and suppression of messages 4 18 1 Default Options In this menu option you can set the options you want FORCHECK to use by default that means for new projects and for unchanged project or file options 4 18 2 Directories The includ
126. ed to learn from your experiences 3 9 5 Using include files The syntax for the INCLUDE line or include preprocessor directive can vary with the platform for which the program has been developed FORCHECK can handle most dialects However if you analyze the source on e g a Windows platform and the source is for unix or VMS it could be difficult to place the include files in the correct directories The paths to search for include files can be specified for all projects select Options Preferences Directories Or for the current project select Options Project Options Include directories 3 9 6 Multi platform development If your code is standard conforming you will have minimal problems to port the program to the various platforms You can also create a configuration file in which the language extensions which are available on all the platforms you support are enabled The code which is specific for some of the platforms can be selected using cpp preprocessing which is supported by FORCHECK Some types can be different on the various platforms In that case you have to analyze the code for each platform applying the specific configuration files in which the different types are listed FORCHECK presents a warning if you use the implicit type in one instance and the explicit type in another e g when associating arguments because that is a portability risk 24 CHAPTER 3 TUTORIAL Chapter 4 Operation 4 1 Using the IDE To start th
127. efore in effect for the entire analysis except for those input files for which the negated options have been specified When you specify an option with an input or library file the option is local so it will only be in effect for that file A local option overrules the global option temporary The AP AR CO DF ID IP MDF MK LG RP RSF SC SMD SMV SP SRS options are always global and can only be specified with or at the position of the listing file Library file options can only be specified with library files The options PL PW SB SC SH SI SMD SMV SP SRS SS have only effect if a listing file has been specified Include directories common blocks modules roots symbols to be defined and program units in an option argument list must be separated by a An option can be negated by NO or by a sign for example NOF77 or F77 Defaults NOAC AP NOAQI AR NOBA CN 19 NOCO NOCR NODC NODE NODF NODP NOEX NOF77 NOF9 NOFF NOHE 14 NOID NOTL INF NOINTENT NOINTR NOIP NOMDF NOMK NOLG NOOB PL 62 PW 100 NOR8 NORE NORI NORP NORSF NOSAVE SB NOSC SH SI SMD NOSMV SP SR SS NOTR NOUP WA For files with a filename extension of F90 F95 F03 or FO8 the default source form is freeform FF On the page headers of the listing the specified nondefault analysis options will be shown You can set the default options using the IDE or by editing the file FORCHK CFG in the FORCHECK application data dire
128. en mixed the common block type will be left blank The size of the common block is presented in bytes When the name table is full or the common block has too many objects to check or when an array or record is too long the size cannot be determined and will be left blank The largest size of all occurrences of the common block is presented The total size all common blocks will occupy is presented Cross reference of external files All external files used in the program are shown as a list of unit identifiers with all subprograms in which the external files are referenced The types and operation codes are presented The unit identifier is the name or expression as specified in the I O statement Because the value of the unit identifier is not known to FORCHECK I O references may be placed incor rectly together or separately By using consistent names for all unit identifiers throughout the program the I O reference tables however will be of utmost value Type of I O D direct access F formatted S sequential access U unformatted When the access or format type is unknown to FORCHECK the access or format type will be left blank I O operation codes A auxiliary REWIND BACKSPACE ENDFILE DELETE UNLOCK LOCKING C CLOSE F FIND I INQUIRE O OPEN or DEFINE FILE R READ or ACCEPT W WRITE REWRITE PRINT or TYPE Cross reference of modules For each module all subprograms which reference that module are presented Modul
129. ence entity is not a public entity of the imported module sub module unused e The complete option has been specified and the module is not imported in any of the analysed program units or a submodule is not used eq or ineq comparison of floating point data with constant e Because of limited precision and different implementations of real and complex numbers the result of this comparison may be unpredictable undefined operation undefined dummy argument not in entry argument list e The variable has been referenced but when entered through the previous ENTRY statement no value has been assigned to the variable possibly undefined dummy argument not in entry argument list e The variable has been conditionally referenced but when entered through the pre vious ENTRY statement no value has been assigned to the variable not locally associated specify SAVE in the module to retain data e A target must be associated with a pointer before being defined or referenced The variable is not associated in this program unit and is use associated but not saved From Fortran 2008 on module data are saved by default actual argument must be a variable e The dummy procedure argument is an output or input output argument and could modify the actual argument variable more than once in actual argument list 168 672 673 674 675 676 677 678 679 680 683 684 685 686 APPENDIX D MESSAGE SUMMARY e The
130. ent extends a previously declared namelist with the same name invalid type unrecognized value e An unsupported nonstandard Fortran value has been detected invalid usage of value nonstandard Fortran value invalid repeat e A nonzero unsigned integer constant is required missing repeat e A nonzero unsigned integer constant is required invalid usage of repeat invalid usage of scale factor e A scalefactor is only allowed for floating point edit descriptors nonstandard edit descriptor missing or invalid width e A nonzero unsigned integer constant is required invalid edit descriptor e No valid edit descriptor was detected external i o not allowed in a pure procedure namelist unreferenced 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 155 e A namelist has been specified but is never referenced used more than once in namelist group namelist group undefined e A namelist group is referenced but it has not been specified stream and async i o only allowed on ext files and not on units namelist i o only allowed for sequential i o accompanying subprogram statement missing or incorrect no main program e The complete option was specified but no main program is present recursive reference possible recursive reference more than one main program e A main program is a program unit of which the first statement is not a BLOCKDATA SUBROUTINE or FU
131. ents are referenced using variable array indices or substring values which cannot be verified statically Recursive I O attempts will only be detected in a limited number of cases FORCHECK does not compare the consistency of format strings with the actual I O list This is because many I O lists have implied DO loops which generate a variable number of elements Future versions of FORCHECK may check format strings as far as possible 119 120 APPENDIX B LIMITATIONS B 1 Configuration determined limits The tables used in FORCHECK to store all information have limited sizes The sizes of all internal tables will be specified in the following table These limits cannot be changed by the user When a limit has been exceeded a system message will be given Analysis will proceed but will no longer be complete value description 255 max length of a file specification 255 max length of an include filename 512 max number of characters in an input record 512 max number of characters in an output record 25 max nesting of include files 100 max nesting of modules 50 max nesting of references in call tree 200 max number of library files 1000 max number of non comment lines in a statement 20000 max number of characters in a statement 8000000 length of name table 20000 max number of contexts in a program unit 100 max nesting of structures unions maps 16 max number of parameters of a derived type 100
132. er 42 in the con figuration file A 24 Prime Fortran 77 extensions In line comment between and is not supported anymore The maximum number of continuation lines allowed depends for Prime Fortran on how many language elements each line contains FORCHECK allows 19 continuation lines by default Both the INCLUDE line and the INSERT directive are supported The B field edit descriptor is not supported The SHORTCALL statement is not supported The FULL LIST compiler directive is not supported A 25 Salford Fortran extensions Most FTN77 386 extensions are supported but a number of the newer FTN extensions are not Though the maximum number of continuation lines supported is 19 for fixed format and 39 for free format the FTN compilers allow more continuation lines depending of the length of the lines FTN95 allows 19 in fixed format 39 in free format and 99 in free format in NET configuration or if the Fortran 2003 switch FO3 has been specified The compiler directive OPTIONS will be recognized but the specified qualifiers will have no effect Internal procedures are not supported INTERRUPT SUBROUTINE SPECIAL SUBROUTINE and SPECIAL ENTRY are not supported Conditional compilation CIF CELSE CENDIF is not supported The prefix to denote an address in a DATA statement is not supported Business editing is not supported 110 APPENDIX A SUPPORTED FORTRAN SYNTAX A 26 Silicon Graphics MIPSp
133. erenced the definition of the operator can be removed from the subprogram Common blocks The cross reference table of common blocks displays the following information The name of the common block The type The size of the common block The operation codes The or ed operation code of all objects in each common block is presented The line or statement numbers of all occurrences of the name of the common block Common block types CH character N numeric If both character and numeric variables are stored in a common block the type will be left blank The size of the common block is presented in bytes If the name table is full or if the common block has too many objects to check or if an array is too long the size cannot be determined and will be left blank When none of the objects of a common block have been used the common block will be flagged as unreferenced unless is has been specified in an include file or a referenced module When flagged as unreferenced the common block declaration can be removed from the subpro gram except when this subprogram is the root of those subprograms which use this common block and the common block does not have the SAVE attribute in each of the occurrences In that case the declaration may be necessary to save the data and the linker may need it to build correct overlay structures External files The usage of external files is shown as a list of unit identifiers with access typ
134. erences than FORCHECK can store in its tables a message will be printed and the remaining referenced procedures with its references will be printed in separate sub trees 5 2 3 Display of sub trees of the reference structure One or more separate sub trees can be displayed by specifying the roots of the sub trees as the root list in the show reference structure SRS r option Now the referenced procedure tree is displayed down from the procedures specified only 5 2 4 Reference structure in XML format The reference structure is stored in XML format in the reference structure file together with its data type definition dtd Reference is made to the XSL stylesheet file _fck_tree xs which must be in the working directory With a suitable browser you can browse through the reference structure Suitable browsers are the one integerated in the FORCHECK IDE Mozilla Firefox Microsoft Internet Explorer Opera and Apple Safari You can also transform the XML file to an HTML file using for example the Unicorn Enterprises SA XSLT processor http www unicorn enterprises com products_uxt html the HTML file can then be explored using your internet browser Because the data are stored in xml format you also can write your own programs to analyse and visualize the reference structure 5 3 Display of module dependencies The dependencies of modules is presented in in the listing file as a tree view if the show module dependencies SMD is in effect
135. erface The way to instruct the program to perform the required actions program unit The fundamental component of a program A sequence of statements com ments and INCLUDE lines It may be a main program a module an external subprogram or a 194 APPENDIX F GLOSSARY block data program unit qualifier See option rank The number of dimensions of an array Zero for a scalar real type An arithmetic type capable of approximating the value of a real number record 1 A sequence of values that is treated as a whole within a file 2 A named data entity consisting of one or more fields contained in the program Fortran 77 extension record length 1 The number of bytes or storage units that make up an entity in a file 2 The number of bytes a record Fortran 77 extension occupies recursive reference A subprogram is recursively referenced when the subprogram is invoked from within that same subprogram either directly or via other subprograms reference structure The hierarchical call tree in which all references of subprograms are pre sented graphically reference The appearance of an object designator in a context requiring the value at that point during execution the appearance of a procedure designator its operator symbol or a defined assignment statement in a context requiring execution of the procedure at that point or the appearance of a module name in a USE statement relational expression An expression th
136. ers and the conformance to the Fortran 77 standard option has been specified e The name or operator is longer than 31 characters and the conformance to the Fortran 90 standard option has been specified e The name or operator is longer than the maximum name length supported by the emulated compiler operator name must consist of letters only name is not unique if truncated to six characters invalid name e The syntax of the name is in error Invalid characters have been used in the identifier statement label too long e A statement label must consist of 1 to 5 digits multiple definition of statement label this one ignored statement label already in use statement label type conflict e A label must either be used to identify a format statement or a non format state ment invalidly referenced invalid reference referenced from outside entry block 130 122 123 124 125 134 135 136 138 139 140 141 142 143 144 145 APPENDIX D MESSAGE SUMMARY statement label invalid format statement label missing undefined statement label e A referenced statement label has not been defined statement label unreferenced e A statement label has been defined but is never referenced used format statement unreferenced missing apostrophe or quote e The closing apostrophe or quote of a character constant is missing zero length character constant e In Fortran 77 a character constant must not be
137. es unreferenced common block objects and unreferenced imported module variables in the program unit cross references Default SI show program SP Show cross reference listings of the program See also the section Global program cross ref erences of the chapter Analysis Default SP show reference structure SRS Show the complete reference structure of the referenced procedures See also the section Ref erence structure of the chapter Analysis Default SRS show reference structure SRS r Show the reference structure for the roots specified The specified roots must be separated by a Default SRS show common SC Show cross reference listings of common block objects See also the section Cross reference of common block objects of the chapter Analysis Default NOSC show common SC c Show cross reference listings of common block objects of specified common blocks The spec ified common blocks must be separated by a Default NOSC show public module derived types SMT Show cross reference listings of public module derived types See also the section Cross ref erence of public module derived types of the chapter Analysis Default NOSMT show public module derived types SMT m Show cross reference listings of public module derived types of specified modules The speci fied modules must be separated by a Default NOSMT show public module data SMV Show cross reference li
138. es and operation codes The unit identifier is the name or expression as specified in the I O statement The value of the unit identifier is not known to FORCHECK Therefore I O references may be placed incorrectly together or separately By using consistent names for all unit identifiers throughout the program the I O reference tables however will be of utmost value type of I O 5 2 REFERENCE STRUCTURE CALL TREE 63 D direct access Q sequential access S stream access F formatted U unformatted When the access type or format type is unknown to FORCHECK the access type field or format type field will be left blank I O operation codes A auxiliary REWIND BACKSPACE ENDFILE DELETE UNLOCK or LOCKING C CLOSE F FIND I INQUIRE O OPEN or DEFINE FILE R READ or ACCEPT W WRITE REWRITE PRINT or TYPE Include files Include files which contain only definitions of constants variables and common blocks which are not referenced outside the include file are marked as unreferenced except in the specifica tion part of a module Then the INCLUDE line can be removed from this program unit except when common blocks which are in the root of those subprograms which use these common blocks and do not have the SAVE attribute have been declared in the include file concerned In that case the declaration may be necessary to save the data and for your linker to build correct overlay structures 5 2 Reference structure Call tree
139. esented table overflow but no error messages presented com FR N error messages presented 16 fatal error occurred To prevent closing of the window before you could have examined the results FORCHECK prompts to press enter to continue at exit You can suppress this prompt by specifying the BA option 4 6 ABORTING FORCHECK 39 4 6 Aborting FORCHECK You can abort the command line version of FORCHECK by pressing Ctrl and C key simultane ously All files will be closed and the scratch files deleted before FORCHECK exits Only in the case of a power fail or when you reboot your system during the operation of FORCHECK you may find some temporary files in the directory denoted by TMP in the file FORCHK CFG or if not specified in the current directory 4 7 The usage of include files When FORCHECK encounters an include line or compiler directive it tries to open and read the include file specified When an absolute path has been specified for example C SRC FILE INC or PROJECT INCFIL INC it opens this file When no device or directory or a relative path has been specified FORCHECK first tries to find that file relative to the directory of the source file in which the include directive has been specified Then FORCHECK tries to open the include file relative to the current directory After that it uses the directories as specified by the include path IP p option When not found it uses the include paths as specified under Options
140. expected unsigned nonzero integer expected expression expected constant expression expected integer expression expected 295 296 298 299 300 301 302 303 304 305 306 307 308 309 310 312 143 scalar integer or real variable expected NULLO or target expected integer logical or character expression expected integer or character expression expected logical expression expected character constant or unsigned integer constant expected character expression expected character substring must not be zero sized in this context scalar logical expression expected scalar integer expression expected scalar integer or real expression expected array expected variable not defined e The variable is referenced but has not been defined No value has been assigned to the variable to the elements of the array if the variable is an array or to the components if the variable is of derived type or the fields of a record e The variable is specified in a sub module but is not saved no statement label assigned to this variable e The variable has been referenced as a label but no label has been assigned to the variable possibly no statement label assigned to this variable e The variable has been referenced as a label but if statements are executed sequen tially no label has been assigned to the variable There might be however a path through which the variable is assigned before reference
141. extensions FORCHECK folds all input to uppercase The Absoft compiler supports folding to upper case to lowercase or treat input case sensitive Absoft has compiler options to specify the kind of free form source code FORCHECK also supports various kinds of free form input but you have to specify this in the configuration file Default is the Fortran 90 format Absoft has a compiler option to support C string backslash editing For FORCHECK you have to enable extension 42 in the configuration file Absoft has compiler options to support conditional compilation lines beginning with D d X or x In the supplied configuration file for FORCHECK only conditional lines beginning with D or d are enabled To accept also lines beginning with X or x you must enable extension 3 in the configuration file which however accepts conditional lines beginning with any letter FORCHECK supports DO WHILE ENDDO but not WHILE ENDDO FORCHECK does not support the following keywords GLOBAL INLINE VALUE GLOBAL DEFINE REPEAT A 6 Apollo Domain Fortran extensions The Apollo Domain compiler can read source records up to 1023 characters in free form mode FORCHECK reads a maximum of 256 characters only The number of continuation lines is unlimited for the Apollo Domain compiler FOR CHECK can read a maximum of 999 continuation lines only The Apollo Domain SR10 Fortran compiler accept
142. extensions lt lt covers ae a Ee riri 108 A 22 Microsoft Fortran extensions ee es 108 A 23INDP Fortran extensions s o coc aacr curand ea a a ee e 109 A 24Prime Fortran 77 extensi ns 2102 ia a a A ee Se 109 A 25 Salford Fortran xtensi ns o a a ee eee ee Oe ee ee td ee bt Gs 109 CONTENTS 7 E F A 26Silicon Graphics MIPSpro Fortran 77 extensions o o 110 A27 Sun Fortran 77 GXGG0SIONS co e seacor a nia eee Pea A a E a 110 A 2868 Unisys 1100 Foftr n 77 extensi ns acoso Pe oe pad Rae a hee eee 110 A 29Watcom Fortran 77 extensions co 2402 64 ee be wee eea eee Phe ee eR 110 A 30Changing the configuration file 0 0 ce ee es 111 A JOLGENERAL otros we be eA Rae ee eV ade ede eee as 111 AOL EXTENSIONS Saa a a eae a ea aes dan 112 PSO SUNTRINGICS Sox a ed we A ee ia A a ee ee ed 113 A 30 4 OCI OPEN CLOSE INQUIRE specifiers 1 o o ooo o 116 AJO MESSAGES Scaricare Te eS 118 O A ae a see A ee eg ee a 118 AN VARIOUS 6 5 45 6 26S a Soke ae Baw ee ne ea a Ba ak ee a ahs 118 Limitations 119 B 1 Configuration determined limits 2 0 0 0 e ee ee ns 120 History of changes 121 Message summary 123 References 181 Glossary 185 Index 199 CONTENTS Chapter 1 Introduction FORCHECK is a Fortran program development conversion maintenance and documentation tool It parses Fortran programs verifies the syntax and composes cross reference tables It analyzes both separate program unit
143. fier e One of the standard options is specified and the specifier is not in the Fortran stan dard e The specifier is an old obsolescent synonym for a standard specifier more than once specified e The specifier has already been specified in the list invalid usage of specifier e POS only allowed for an external unit that is not specified by an asterix e ID only allowed in combination with PENDING e If NEWUNIT specified FILE or STATUS must be present no unit specified no unit or filename specified 461 462 463 464 465 466 467 468 469 470 471 472 473 474 476 477 153 unit and filename specified invalid or missing io unit identifier e A unit identifier must be an asterix standard unit a positive integer expression or a character variable missing or invalid format specifier e A format specifier must be a label of a format statement an integer variable to which a label of a format statement is assigned a character expression containing the format specification a non character array name language extension In Fortran 90 a namelist group name must be specified with the NML specifier missing delimiter in format specification statement label expected more than once in OPEN CLOSE or INQUIRE list e A variable or array element or any associated entity must not be both referenced and defined or defined more than once in an OPEN CLOSE or INQUIRE stateme
144. first element e The kind of this array element is inconsistently specified compared to that of the first element One has the default kind the other has an explicitly specified kind mixing of protected and non protected objects in equivalence 750 751 752 753 754 759 756 737 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 173 W unsupported kind type parameter default assumed e The kind type parameter of this type is not supported by the emulated compiler W unsupported kind default assumed e No supported kind can be found that matches W unsupported character set e No supported kind can be found for this character set each element must have the same kind type parameters no objects to allocate or to deallocate unrecognized keyword type spec or SOURCE required One or more of the allocate objects have deferred type parameters no entities imported from module invalid target for a procedure pointer procedure already in list of final subroutines of this derived type final procedure has no unique argument list type parameter specified more than once or unknown empty parameter list deferred type parameter not allowed assumed type parameter not allowed each length type parameter must be assumed SEQUENCE type or BIND attribute not allowed type must be an extension of the selector NOPASS must be specified passed object argument
145. formational message will be presented If the analyse reference structure AR option is also in effect the call tree will traversed to detect unsaved common blocks which are not specified in the root of referencing program units See also the section Analysis of the reference structure 5 4 4 Verification of modules When the complete program CO option is in effect each module which is analyzed but not referenced is reported All public module variables which are not referenced not defined not allocated or not associated will be listed All public constants and public derived types which are not referenced are listed If the analyse reference structure AR option is also in effect the call tree will be traversed to detect modules with unsaved public data which are not referenced in the root of referencing program units See also the sections Analysis of the reference structure 5 4 5 Global program cross references Global program cross references are generated if a listing file has been requested and the show program SP option is in effect If no global program cross references are presented all diagnostic messages are send to your screen or the log file An after a list of names in a cross reference table indicates that there are more references to that item than presented Module procedures are qualified with the name of the module from which they are ref erenced Renamed procedures are presented by their use name
146. geen hi a e 47 4 14 4 Redefinition and suppression of messages 0 00 00 eee eee ee 47 4 14 5 Temporary suppression of messages ooo ee eee 47 4 14 6 Reporting Messages oo scsi Bea eee ea a es 48 4 15 Toning the ouput eo daw da ee a Ras eee aE a eck a ee a 49 4 16 Line or statement numbering 0 ee es 49 4 17 Date and time format a gow a ec en ararat a ww ew ew 50 4 18 Changing default settings from the IDE o o ooo ooo o 51 1181 Default OPUNE ss mia a a ee ee Pa ee da ir 51 18 2 Directories y avaro a a AA AA ee OS 51 4 18 3 Default file name extensions s s 006 bee ee ee aa ee 51 4 18 4 Compiler emulation es 51 US EO erei ices ab A ees oe ae ee ee Ae ee 51 ASG Baile SOR e 2 since ais ew oe ew Sata aw A ewe ara ee ee ee 51 4 18 7 Source line statement numbering 0 000 eee ee ee es 52 4 18 8 Date time format 52 5 Analysis 53 5 1 Program unit analysis o ris a ai a RE e ta A 53 5 1 1 Interpretation of source code TeCOrdS ooo 53 5 1 2 Lay out of source code liStid8 o o ooo ooo o 54 Dalia SRL ADA NSIS 2 re AA ee e ee a Os 54 Sik Typeverilication ce a e a ee ee R 54 5 1 5 Local verification of argument lists o ooo ooo 55 5 1 6 Verification of procedure entries ooo o e 55 5 1 7 Fortran intrinsic procedures o ooo 56 Slds Fonc on procede ue ta he as AAA eae 5
147. gument associated with an INTENT IN dummy argument S actual argument associated with a dummy argument with unknown intent or INTENT INOUT An after C or Q denotes that the name is not referenced used and therefore is dummy When variables are specified in an EQUIVALENCE statement the operation codes are presented for each variable name separately However when a variable is in a common block all objects specified in the equivalence lists concerned are in common and a C will be presented for all these objects An after this C indicates that none of the objects in the equivalence lists containing this variable have been used Only when the list unreferenced items SI is in effect common block objects and mod ule data that are not referenced are included in the cross reference listing Referenced but undefined variables are flagged Unreferenced variables are flagged except those which are in common or in a module They are not used and can therefore be removed from the subprogram without affecting the operation of the program To get an idea of its size FORCHECK presents the total size of the used local variables Use associated allocatable and automatic objects are not included Variables with the POINTER attribute account for the size of a pointer only Structures and records Structures and records are a Fortran language extension as offered by some compiler vendors The cross reference table of records displays the fol
148. gument can be rank 1 or 2 6 argument must be a dummy argument 7 argument must be the name of a variable or external procedure 8 argument must be a pointer or pointer procedure In which N is the highest rank of all arguments 5 Argument must have the same type as the previous ones if any logical If the resulting type kind of the intrinsic procedure depends on the type kind of this argument this flag must be set true 6 Argument is optional logical 7 Argument must be defined on entry logical 8 Argument will be defined logical 9 Optional comment string A 30 4 OCI OPEN CLOSE INQUIRE specifiers FORCHECK recognizes all standard Fortran specifiers Moreover the additional specifiers as specified in the configuration file will be recognized You can modify the configuration file and remove add or change the nonstandard specifiers to be recognized FORCHECKcan accept added specifiers which are standardized in a higher Fortran standard level than the Fortran conformance level as specified in this configuration file without reporting You can group the added specifiers for each language level Each group must have one of the following headers Fortran 90 additions Fortran 95 additions Fortran 2003 additions Fortran 2008 additions The nonstandard compiler specific additions must be in a group with the following header Nonstandard additions If you specify e g Fortran 2003 conformance F03 only the specifiers
149. haracter storage unit The unit of storage for holding a scalar that is not a pointer and is of type default character and character length one class A set of types extended from a specific type collating sequence An ordering of all the different characters of a particular kind type param eter command input The entry of commands to instruct a program to perform the required ac tions command file A file containing command input command file entry The entry of commands through specification of a command file command line entry The entry of commands through typing command lines common block A block of physical storage that may be accessed by any of the scoping units in a program common block object An entity in a common block denoted by a name a variable or record 187 Fortran 77 extension common block size The number of bytes the common block will occupy compiler A program that translates a program written in a higher programming language into code understood by the computer compiler directive An instruction to the compiler to assist processing of source statements compile time The time during which the compiler processes the source file complex constant An ordered pair of signed or unsigned real or integer constants separated by a comma and enclosed in parentheses The first constant of the pair is the real part of the complex constant the second is the imaginary part complex type An approximatio
150. haracters as significant By default GNU Fortran supports C string backslash editing This can be disabled using the compiler option bs FORCHECK supports backslash editing if extension 42 has been enabled in the configuration file which is the default for the GNU Fortran 77 compiler emulation GNU Fortran accepts a statement label after a statement separator FORCHECK does not support this feature GNU Fortran accepts continuation lines of INCLUDE directives and more than one INCLUDE directive can be placed on a single line using statement separators FORCHECK does not support these extensions A 17 HP UX FORTRAN 9000 and HP Fortran 77 extensions There are minor differences between the HP UX FORTRAN 9000 compiler of the HP 9000 300 and 9000 700 series and the HP Fortran 77 compiler of the HP 9000 800 series Though the HP Fortran compilers accept names up to 255 significant characters FOR CHECK considers only the first 64 characters as significant HP compilers interpret a as end of line comment when in column 1 or in column 7 to 72 FORCHECK interprets a in all columns but column 6 as end of line comment as in Fortran 90 In FORCHECK the L character is always processed as a formfeed In HP UX FORTRAN 9000 L is only accepted when found in column 1 of an input record The INCLUDE line and the include compiler directive are both supported A 18 IBM AIX XL FORTRAN EXTENSIONS 107 All compiler directive
151. he Digital Research compiler a configuration file with the supported types is supplied and the INCLUDE directive is supported When you want FORCHECK to accept the Digital Research compiler extensions you have to adapt the configuration file Configuration files for the following Fortran 90 Fortran 95 Fortran 2003 and Fortran 2008 compilers are supplied A 2 GENERAL LANGUAGE EXTENSIONS SUPPORTED 77 Configuration file Mnemonic Compiler name absoftf95 cnf AB95 Absoft FORTRAN 95 V6 crayf90 cnf CF90 Cray Fortran 90 V2 crayf03 cnf Cray Cray Fortran V7 cvf cnf CVF Compaq Visual Fortran V6 6 decf90 cnf DEC Fortran 90 decf95 cnf DEC DEC Fortran 95 fujitsu cnf FUJ Fujitsu Fortran 90 gfortran cnf gfort GNU Fortran 95 g95 cnf 995 Open source Fortran 95 based on GNU hpf95 cnf HP95 Fortran for HP UX intel7 cnf Intel Visual Fortran V7 0 intel9 cnf Intel Visual Fortran V9 0 intel0 cnf Intel Visual Fortran V10 0 intel11 cnf Intel Visual Fortran V11 0 intel12 cnf Intel Visual Fortran V12 0 intel13 cnf INT Intel Visual Fortran V13 0 ibmx1f cnf XLF IBM AIX XL Fortran laheyf90 cnf LF90 Lahey Fortran 90 laheyf95 cnf LF95 Lahey Fortran 95 msfps cnf MSF Microsoft Fortran PowerStation V4 0 nagf90 cnf NagWare f90 Compiler nagfor cnf NAG NagWare f95 Compiler nasf95 cnf NASoftware Fortran Plus Compiler pgif90 cnf The Portland Group Fortran 90 Compiler pgif95 cnf PGI The Portland Group Fortran 95 Compiler pathscale cnf PATH PathScale
152. he analysis is carried out The progress window shows the steps taken You can study the result of the analysis by browsing the reportfile Expand the report tree in the project view and open the report file by selecting it and press view on the toolbar or double click on the filename When using FORCHECK in command line mode an example of the analysis of a single source file is forchk mysourcefile 3 3 ANALYZING MORE THAN ONE SOURCE FILE 19 The default filename extension is for For the required options see the previous section These options can be specified on the commandline before the source file forchk options sourcefile e g forchk AC CN 99 FF DF X86 IP mysourcefile for The negative form of an option is the option preceded by NO e g NOFF for fixed form If the source file contains more than one program unit they are analyzed in the sequence of occurrence and a global analysis is performed in addition to the program unit analysis 3 2 1 Suppressing messages If you get an overwhelming number of informational messages and warnings suppress them for the time being Select Options Project options from the Menu bar The Project options window appears and you can uncheck the show informative messages INF and or show warnings WA option Or when using the commandline apply NOINF Do not show informative messages NOWA Do not show warnings 3 2 2 Producing a source listing with cross references For a new projec
153. ibrary file The default file name extension is FLB The following options can be specified BA Exit if errors during command input When FORCHECK is started from a batch file this option suppresses interactive handling of command input errors HE Present help information on screen 4 11 THE USAGE OF LANGUAGE EXTENSIONS 43 CM Compress the library LI List the program units contained in the library The output is send to the screen LI 1 List the program units contained in the library The output is placed in the file 1 RM s Remove one or more program units from the library When you specify the RM option in interactive mode FCKLIB prompts for a program unit to be deleted New prompts appear until you hit just lt enter gt in response to the prompt Examples FCKLIB TSTLIB RM SUB This command will remove the program unit SUB from the FORCHECK library file TSTLIB FCKLIB TSTLIB RM SUB1 SUB2 This command will remove the program units SUB1 and SUB2 from the FORCHECK library file TSTLIB FCKLIB TSTLIB CM This command will create a new compressed library TSTLIB FLB out of the existing library TSTLIB FLB You can combine the RM and CM options in one command FCKLIB TSTLIB RM SUB CM When you enter the RM and the CM options in one command FCKLIB first will remove the information on the specified program units from the library file and then will compress it 4 11 The usage of language extensions FORCHECK
154. id argument type length for intrinsic procedure e The type length of the argument of a specific procedure is incorrect e No specific procedure could be generated of which the argument type length matches the actual argument type length e A specific procedure has been generated with an argument type length which matches the argument type length of the first argument but the type length of one of the other arguments does not match intrinsic function is explicitly typed e Intrinsic functions are implicitly typed and need not to appear in a type statement 166 633 634 635 636 638 639 640 641 642 643 644 645 646 647 648 APPENDIX D MESSAGE SUMMARY invalid usage of built in function e This built in function can only be used in an actual argument list invalid assignment variable more than once in statement e If a variable occurs more than once in a statement it must not be modified during evaluation of the statement Fortran 77 The dummy procedure argument is an output argument and will modify the actual argument possible invalid assignment variable more than once in statement e The variable occurs more than once in the statement in which the procedure is referenced and might be modified during the reference Fortran 77 INTENT must be specified for this dummy argument e The intent of the arguments of a pure subprogram must be specified e The intent of the arguments of an elemen
155. ied FORCHECK scans the libraries in the specified order and includes all referenced program units found in the global analysis Each individual library is searched recursively until no references are resolved any more You can force FORCHECK to include all or only specific program units from a library in the analysis When you specify no source input files but library files only FORCHECK will perform a global program analysis and presents the reference structure and program cross references 40 CHAPTER 4 OPERATION when asked for All information contained in the first library file will be included in the analysis by default The other libraries are searched for referenced program units as explained before 4 8 1 Using FORCHECK libraries in the IDE When you want to create a library file you must specify the filename in the create update library file section of the project view You can do this by first selecting the create update file category and then selecting Project Add file s and enter a file specification You also can right click on the create update library file and select add file If the file does not exist the library file will be created and the global information of the analyzed program units will be stored in this library file If the create update library file already exists the actions depend on the preferences selected The global information of the analyzed program units is either added to or replaced in the existing library f
156. ield file options 27 file name extensions 51 FORALL index dummy argument 66 operation code 60 FORCHECK installation 13 overview 9 INDEX FORCHECK operation 25 form feed 53 format verification 119 format type external file 62 69 formatting messages 48 Fortran 2003 option 22 32 44 53 54 79 113 116 Fortran 2008 option 32 53 54 79 Fortran 77 option 32 54 79 Fortran 90 option 17 32 53 54 79 Fortran 95 based on GNU 77 Fortran 95 option 32 53 54 79 Fortran extensions 43 75 79 112 Fortran for HP UX 77 Fortran standard option 22 33 43 53 54 79 Fortran 77 standard 32 free source form 45 53 free source form option 18 32 53 54 FIN77 76 FINO9O 77 FIN95 77 Fujitsu Fortran 90 77 function see procedure 66 generic 56 impure 56 specific 56 type 58 68 type code 57 61 68 function subprogram 56 g95 77 generic function 56 generic procedure type code 61 gfortran 77 GNU Fortran 77 76 extensions 106 GNU Fortran 95 77 HE option 45 HE option 42 HP Fortran 77 HP Fortran 77 76 INDEX extensions 106 HP UX FORTRAN 9000 76 extensions 106 I O list format verification 119 12 option 32 14 option 33 18 option 33 IBM Professional Fortran 76 IBM VS Fortran 76 extensions 107 IBM XL Fortran 77 extensions 107 TD option 36 IF max nesting 120 IL option 36 40 41 120 IMPLICIT NONE 31 implicitly typed option 31 i
157. if a storage unit of one is the same as a storage unit of the other string A character literal constant stride The increment specified in a subscript triplet structure A scalar data object of derived type Fortran 90 or 95 or a group of statements that define the form of a record Fortran 77 extension structure component The part of an object of derived type subobject A portion of a data object that may be referenced or defined independently of other 196 APPENDIX F GLOSSARY portions subprogram A function subprogram or a subroutine subprogram Note that in Fortran 77 a block data program unit was called a subprogram subroutine A procedure that is invoked by a CALL statement or by a defined assignment state ment subroutine subprogram A sequence of statements beginning with a SUBROUTINE statement that is not in an interface block and ending with the corresponding END statement subscript One of the list of scalar integer expressions in an array element selector Note that in Fortran 77 the whole list was called the subscript subscript triplet An item in the list of an array section selector that contains a colon and specifies a regular sequence of integer values substring A contiguous portion of a scalar character string suffix See File name extension symbolic constant See Named constant symbolic name See Name syntax The lexical structure of the language system Message A message presen
158. ile or a new library file will be created Select Options Preferences Libraries to set the preferred actions When the global information of a set of program units has been stored in a library in this way you can analyze new or changed program units in the context of the previously analyzed program units by referring to this library To do this you must promote such a library to the category of reference library files You also could create separate projects for maintaining the library files with all support program units and one for each application For a reference library file you can specify the include IL option Using this option you can force FORCHECK to include all or specific program units from a library in the analysis If this option is not specified Forcheck automatically retrieves the referenced subprograms form the library See the section Maintaining library files on how to list the contents and remove program units from the library files 4 8 2 Using FORCHECK libraries in command mode When you want to create a library file you specify the create library CR option The library file will be created and the global information of the analyzed program units will be stored in this library file For example FORCHK TEST FOR TESTLIB FLB CR will analyze the source file TEST FOR and place the global information in the newly created library file TESTLIB FLB Now new or modified program units can be analyzed and their globa
159. iles The source files must be separated by a E g forchk mylistfile FF mysourcefilel mysourcefile2 The options specified before the source input files are global they are in effect for the global analysis and operate on each source input file If you like to specify certain options for a specific source file you can specify local options with a source filename E g forchk mylistfile FF mysourcefilel mysourcefile2 NOFF Now mysourcefilel is supposed to be in free form and mysourcefi 1e2 in fixed form 3 3 1 Analyzing all source files in one or more directories When using the commandline you can specify wild cards to analyze all source files in a directory e g forchk mylistfile NOINF for NOFF f90 3 3 2 Analyzing your project using a command file You can place the command input in a file and have FORCHECK read this command input file forchk mycommandfile The contents of the command file must look like listfile global_options source_input_file_1 local options source_input_file_n local options 3 4 The program analysis Analyzing the program as a whole adds an extra dimension to the analysis When the majority of the procedures has been included in the analysis you can enable the complete option com plete program CO to signal unreferenced and undefined global items over the program as a whole In that case unreferenced procedures unreferenced common blocks unreferenced and 3 5 THE REFERENCE STR
160. in effect the syntax will be verified for conformance to the FORTRAN 77 Fortran 90 Fortran 95 Fortran 2003 or Fortran 2008 standard respectively as close as possible during static analysis For Fortran 90 and up all constraints as specified in the standard are verified By specifying the flag obsolescent syntax OB option FORCHECK signals all obsolescent features as specified in the Fortran standard which is in effect You can also instruct FORCHECK to accept certain vendor specific Fortran language exten sions The appendix Supported Fortran syntax describes all language extensions supported By default FORCHECK accepts common extensions of the default compiler of the system on which FORCHECK operates To emulate a different compiler or to enable a different set of language extensions see the section The usage of language extensions of the chapter Oper ation Beside performing a lexical analysis and parsing the syntax FORCHECK performs a seman tic analysis FORCHECK presents a message if a variable is referenced without being defined Unless the rigorous syntax analysis RI option has been enabled this is limited to statements which are certainly executed sequentially Loop structures IF THEN ELSE blocks and CASE constructs are verified Because of this extended DO loops though this is a language extension of some compilers will always be flagged as an error by FORCHECK 5 1 4 Type verification As part of the syntax analysi
161. ines must follow 4 two or three arguments allowed two if first argument is complex three argument lines must follow 7 Procedure name allowed as actual argument logical 8 Intrinsic procedure class string A atomic subroutine E elemental function T inquiry function P procedure can be referenced as function or subroutine S subroutine T transformational function 9 Compile time inquiry or transformational function logical 10 Optional comment string Each record for an argument is composed of the following fields 1 Argument name character 2 Argument type character any type allowed but all arguments must have the same type typeless C complex CH character I integer L logical N numeric integer real complex R real T derived type U intrinsic type X any type allowed don t check 3 Argument type kind length integer gt 0 type length 0 any kind length allowed which is allowed for the generic procedure 1 default kind length of the argument type 2 double precision 4 Argument rank integer Special codes 0 argument must be scalar 1 argument must be array of rank 1 2 argument must be array of rank 2 1 array argument required 116 APPENDIX A SUPPORTED FORTRAN SYNTAX 2 argument can be scalar or array even in Fortran 77 3 argument can be scalar or array 4 argument can be scalar or rank N 1 5 ar
162. ing point data with integer e Because of limited precision and different implementations of real and complex numbers the result of this comparison may be unpredictable eq or ineq comparison of floating point data with zero constant e Because of limited precision and different implementations of real and complex numbers the result of this comparison may be unpredictable implicit conversion of complex to scalar e An integer or real is assigned to a complex variable implicit conversion of constant expression to higher accuracy e In an assignment statement precision is lost if the variable is of a more accurate type than the constant or constant expression e Ina complex constant precision is lost if one of the components is of a less accurate type than the other e In an expression precision is lost if a constant is specified in a less accurate type than the resulting expression implicit conversion to less accurate type e Precision is lost due to conversion of real to real of less precision implicit conversion of integer to real non optimal explicit type conversion e If the target of an expression is of type double precision real best is to convert the expression primaries to double precision real explicitly e g by specifying the kind type parameter e If the target of an expression is of type double precision complex best is to convert the expression primaries to double precision complex explicitly e g by specifying th
163. insic type or a derived type parameter that is declared to have the KIND attribute label See Statement label label type The syntactic construct in which the statement label is used determines its type end of a DO loop identification of a FORMAT statement or other labeled common See Named common length Array length character string length type length or record length 192 APPENDIX F GLOSSARY length specification The specification of the type length lexical token A sequence of one or more characters with a specified interpretation library file An external file consisting of an index and the global information on program units line A sequence of characters containing part of Fortran statements a comment or an INCLUDE line list file A sequential formatted file in which the numbered statements are presented with other information concerning the source code listing See List file literal constant A constant without a name local entity An entity identified by a lexical token whose scope is a scoping unit logical constant A constant that can have one of two values true or false logical expression A combination of logical primaries and logical operators The result is the value true or false logical operator Any of the set of operators NOT AND OR EQV NEQV XOR logical primary A primary that can have the value true or false See also primary main program A program uni
164. is defined is flagged with a Only when the list unreferenced items SI option is in effect unreferenced namelist groups which have been specified in an include file or module are listed Referenced procedures The cross reference table of referenced procedures displays the following information The name of the procedure The type see entries The nondefault type kind and length of a function The rank of array valued functions The operation codes The line or statement numbers of all occurrences of the name of the procedure Procedure types E external procedure unknown whether subroutine or function F function S subroutine P procedure Subcodes D dummy E elemental G generic I intrinsic M module N interface n abstract interface P pure p pointer R recursive S statement T internal For the type of functions see the section on entries Only when the list unreferenced items SI option is in effect unreferenced procedures which have been specified in an include file or module are listed When flagged as unreferenced the external declaration can be removed from the subpro gram except when it declares a block data subprogram to be included by the linker 62 CHAPTER 5 ANALYSIS Operators The cross reference table of operators displays the following information The name of the operator The line or statement numbers of all occurrences of the operator When flagged as unref
165. its and the letters A through F base 16 notation hollerith constant A string of any characters preceded by wH where w is the number of char acters in the string host Host scoping unit host association The process by which a contained scoping unit accesses entities of its host host scoping unit A scoping unit that immediately surrounds another scoping unit identifier See Name implicit interface A procedure referenced in a scoping unit other than its own is said to have an implicit interface if the procedure does not have an explicit interface there implicit Type The default type of a name when no type has been specified by a type specifi cation statement implied DO An indexing specification similar to a DO statement but without specifying the word DO with a list of data elements rather than a set of statements as its range include file A file with statements that have to be included in the source code of the program at the place of the include statement which references the include file include path A file directory at which the system tries to locate include files input record A record of the input source file 191 input file A sequence of input records inquiry function An function that is either intrinsic or is defined in an intrinsic module and whose result depends on properties of one or more of its arguments instead of their values intent An attribute of a dummy data object that indicate
166. ivate components common block data not retained specify in root or save it e The common block has not been SAVEd has not been specified in the main pro gram or in the root procedure of the referencing program units so the data become undefined after leaving the program unit public module data not retained specify in root or save it e Not all public module data has been SAVEd the module was not referenced in the main program or in the root procedure of the referencing program units so the data become undefined after leaving the program unit derived type or structure undefined e A variable of derived type is declared but the derived type has not been defined e A record is declared but the structure has not been defined e A parent type name shall be the name of a previously defined extensible type statement invalid within derived type or structure definition e This statement is not allowed within the definition of a derived type or structure derived type or structure name missing e The derived type name is missing in the type declaration e The outer structure must have a name invalid structure nesting missing END TYPE or END STRUCTURE missing END UNION 262 263 264 265 266 268 269 270 271 272 273 274 275 141 missing END MAP invalid usage of record or aggregate field name e Arecord must not be specified in an EQUIVALENCE DATA or NAMELIST statement e An aggregate field name is n
167. keyword is found incorrect number of arguments incorrect argument type incorrect argument attributes number of arguments inconsistent with first occurrence e The number of actual arguments differs from that at the first reference encountered number of arguments inconsistent with first occurrence 160 565 566 567 568 569 570 571 572 573 574 APPENDIX D MESSAGE SUMMARY e The number of arguments of the dummy procedure differs from that at the first reference encountered number of arguments inconsistent with specification e The number of actual arguments differs from that in the specification of the proce dure argument keyword missing in actual argument list e When in an argument list a keyword has been used all subsequent arguments must be specified using keywords argument keyword does not match a dummy argument argument class inconsistent with first occurrence e The actual argument is a function subroutine external name record or label but at the first reference encountered the argument is of a different class type inconsistent with first occurrence e The actual argument of the dummy procedure is a function subroutine external name record or label but at the first reference encountered the argument is of a different class e The type of a common block object differs from that in the first list encountered argument class inconsistent with specification e The actual arg
168. l information stored or replaced in tbis library file by specifying the library file with the update library UP option For example FORCHK TEST FOR TESTLIB FLB UP will analyze the source file TEST FOR and replace the global information in the library file TESTLIB FLB 4 9 THE USAGE OF MODULES 41 Now you can analyze new or changed program units in the context of the entire program by referring to previously created libraries If no library options has been specified FORCHECK references the specified libraries only For example FORCHK TEST1 FOR TESTLIB FLB will analyze the source file TEST1 FOR and verify the procedure references common blocks etc of all references which reside in the library file TESTLIB FLB By specifying the include IL option you can force FORCHECK to include all or specific pro gram units from a library in the analysis For example FORCHK TEST1 FOR TESTLIB1 FLB IL SUB1 SUB2 will analyze the source file TEST1 FOR and verify the procedure references of the program units SUB1 and SUB2 which reside in the library file TESTLIB FLB In the next two examples we analyse library files only FORCHK PROJECTLIB PLOTLIB will analyze the program consisting of all program units contained in the library file PROJECTLIB FLB and all references found in the library file PLOTLIB FLB FORCHK PROJECTLIB PLOTLIB IL will analyze the program consisting of all program units contained in the library files PR
169. lared intrinsic procedures option 33 56 undefined array 60 119 common block object 34 67 119 module data 67 record 60 119 variable 60 119 uninstall 14 Unisys 1100 Fortran 77 76 extensions 110 unit identifier 62 69 max number 120 unreferenced INDEX array 60 common block 34 62 common block object 34 67 constant 58 derived type 58 entry 66 include file 63 module 67 module data 67 procedure 34 66 record 60 subprogram 34 66 variable 60 UP option 36 39 40 update library option 36 39 40 use acquired interface option 31 user function 66 variable actual argument 66 cross reference 59 DO 66 equivalenced 60 in common 62 in include file 63 operation code 59 substring 119 type 58 undefined 60 119 unreferenced 60 VAX Fortran 76 extensions 105 verification of entries 55 verify program option 34 66 view 28 VIRTUAL 104 105 108 VS Fortran extensions 107 WA option 19 36 warning exit status 38 warnings option 19 36 Watcom Fortran 77 76 extensions 110 wild card 29 INDEX 209 XL Fortran 77
170. lated compiler This is a eight character string which will be pre sented at program startup and in the headers of the list file It has no effect on the analysis 2 Fortran conformance level This is a three character string and can be F77 F90 F95 FO3 or FO8 All extensions are relative to the language level specified and all syntax of this language level will be enabled Type information The next subsection Type information specifies the types and kinds supported and the limits of the types 1 Number of bits difference between ABS min and max value of default integer 2 Number of bits for an address as used for integer POINTER extension 55 3 Number of bits for the various integer types 4 Number of significant binary digits of reals 112 APPENDIX A SUPPORTED FORTRAN SYNTAX 5 Decimal exponent range of reals 6 Maximum exponent of reals 7 Minimum exponent of reals 8 Minimum real which is not zero 9 The maximum length of character constants and variables 10 Type mnemonics 11 Default byte lengths of the various types 12 Byte lengths with short length option enabled 13 Byte lengths with short length option disabled 14 Supported types 15 Supported types for generic procedures 16 Table of available kinds and byte lengths 5 lines Miscellanious The next subsection Miscellanious is composed of the following lines 1 Default file name extensions source include List opti
171. least A Personal Computer with an IA 32 processor 512 MB of available memory RAM 13 14 CHAPTER 2 INSTALLATION Monochrome or color display A fixed disk with 80 MB of free space MS Windows 2000 or up The Forcheck distribution kit 2 4 Installing FORCHECK Run forcheck 14 5 win32 x86 exe e g by double clicking on the filename The setup pro gram will start with a welcome screen and asks for a directory to place the FORCHECK for Win dows program and ancillary files By default this is C Program Files x86 Forcheck Subsequently the installer asks for the components to install You can choose to install the FORCHECK analyzer the FORCHECK IDE or both The additional library interfaces are useful if you develop using the cvf Intel compiler or the MPI library 2 5 Password Place the supplied password file as fckpwd pwd in the share subdirectory of the installation directory 2 6 Uninstalling To uninstall FORCHECK for Windows select from the Start menu Settings Control Panel and then Add Remove Programs or start uninstal1 from the Forcheck program group in Start All Programs 2 7 Installation directory The installation path of FORCHECK is stored in the Windows registry so if you want to install FORCHECK on a different location you have to uninstall FORCHECK first If FORCHECK does not find the installation path in the registry it reads the environmental variable FCKDIR to find the installation directo
172. lengths If the intrinsic procedure is a subroutine the procedure type must be specified as S the type length and rank are not relevant and can be set to zero Procedure type character same as the type of the argument s typeless C complex CH character I integer L logical R real X result of MATMUL S no function but subroutine 4 Procedure type kind length integer Special codes gt 0 type length 0 same as the type kind length of the argument s 1 default type kind length of the function type 2 default type kind length of type double precision 3 same as the type kind of the argument s half the type length of the type length of the arguments 4 unknown 5 type kind of an address or integer POINTER 5 Procedure rank and shape code integer Special codes O scalar 1 rank 1 2 rank 2 1 take shape of argument with largest rank 2 rank N 1 3 scalar or rank 1 4 scalar or rank N 1 5 rank 1 or N 1 6 shape of second array argument 7 follow the rules of matrix multiplication In which N is the highest rank of all arguments 6 Number of arguments integer Special codes 0 any number of arguments allowed none argument line must follow 1 one or two arguments allowed one argument line must follow 2 two or more arguments allowed one argument line must follow A 30 CHANGING THE CONFIGURATION FILE 115 3 one or none arguments allowed three argument l
173. lowing information The name of the record The name of its structure The length of the structure the number of bytes a record occupies The rank for arrays of records The operation codes The line or statement numbers of all occurrences of the name of the record The line or statement numbers at which the record is re defined are flagged with a The kind of usage of records is presented as an operation code as described for variables As for arrays only one operation code is presented for each record or array of records This is the or ed operation code of all the operations on the various fields of the record and the various array elements of an array of records Only when the list unreferenced items SI option is in effect common block objects and module records that are not referenced are included in the cross reference listing Unref erenced records which are not in common or in a module are listed Unreferenced structures which are not specified in an include file or module are also listed They are not used and can therefore be removed from the subprogram without affecting the operation of the program 5 1 PROGRAM UNIT ANALYSIS 61 Namelist groups The cross reference table of namelist groups displays the following information The name of the namelist group The line or statement numbers of all occurrences of the name of the namelist group The line or statement number at which the namelist group
174. mplex constants 23 Hollerith de 24 B xxx B xxx binary 25 O xxx O xxx octal de 26 X xxx X xxx hexadecimal 27 Zxxx Z xxx hexadecimal 28 xxx B xxx B binary 29 xxx 0 xxx 0 octal de a 30 xxx X xxx X hexadecimal 31 xxx Z xxx Z hexadecimal 32 Oxxx octal o o 33 Zxxx hexadecimal o o 34 xxxB octal 35 xxx hexadecimal 36 xxx octal 37 xxx hexadecimal 38 radix value 39 radix 50 40 C string xxx C 41 Length modifier suffix B S L 42 C string editing specification statements 43 ALLOCATABLE 44 STATIC 45 DEJALLOCATE deferred dim spec 46 AUTOMATIC 47 BOOLEAN 48 BYTE 49 C EXTERNAL 50 DOUBLE COMPLEX 51 IMPLICIT NONE 52 IMPLICIT UNDEFINED 53 IMPLICIT AUTOMATIC STATIC 54 OPTIONAL INTENT 55 integer Cray POINTER 56 LC BC HC MS MSC EXTERNAL 57 NAMELIST 58 F90 extended NAMELIST features 59 STRUCTURE RECORD 60 F90 derived type 61 VIRTUAL o 62 VOLATILE 63 F90 POINTER TARGET 64 DEFINE 65 automatic arrays 66 DLL_IMPORT DLL_EXPORT 67 C_EXTERNAL Salford STDCALL 68 specif functions in specif expressions 69 type attributes 70 init of var in type spec stmnt 107 F90 init of var in type spec stmnt 71 length modifier after dimensio
175. mplied DO max nesting 120 impure 56 INCLUDE 103 104 106 107 109 INCLUDE 76 105 include 104 include 106 include 103 include dependencies option 36 include directory 37 max number of 120 include file 15 53 common block 67 compiler emulation 44 cross reference 70 listing 34 max nesting 120 max number 120 path 39 referenced 63 unreferenced 63 unreferenced constant 58 unreferenced structure 60 usage 39 include option 36 40 41 120 203 include path option 18 37 39 120 INF option 19 36 information exit status 38 input operation code 60 input file option 37 input record max number of characters 120 INQUIRE keyword 116 120 INSERT 109 installation 13 14 directory 14 distribution kit 13 password 13 setup 15 uninstall 14 Intel Fortran 77 extensions 108 INTENT option 33 interactive entry 29 INTERF 45 72 BA option 45 HE option 45 LI option 45 interf 45 command line 45 interface 55 interface block 71 interface body 71 interface builder see INTERF see INTERF INTR option 33 56 intrinsic procedure 56 66 cross reference 56 emulation 113 nonstandard 113 operation code 60 type code 61 intrinsic procedures max number 120 IP option 18 37 39 120 keyword 204 OPEN CLOSE INQUIRE 116 120 label cross reference 58 max number 120 max number of references 120 type 58 Lahey F77L Fortran 77 76 extensions 108 Lahey
176. n 72 PARAMETER symbol constant If extensions 40 and 42 are both enabled backslash editing is only applied for xxx C strings A 3 TABLE WITH FORTRAN 77 LANGUAGE EXTENSIONS no SGI SUN HP9 DEC CD4 RM RM2 MS5 LH PF NDP FTN WAT AB F2C 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 35 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 107 71 72 t t t 85 86 APPENDIX A SUPPORTED FORTRAN SYNTAX no PDP VAX VS2 UNI CBR PR CF77 CVX 73 initialization of structure components 74 intrinsic functions in PARAMETER 75 intrinsic functions in dimension spec 76 DATA statements mixed with spec stmnts o o o o o 77 IMPLICIT mixed with specification stmnts o 78 F90 KIND and Character selectors 79 F90 attributes and entity oriented decl 80 F90 specification expressions 81 Record fields and records in DATA 82 Subobject of constant in DATA 83 intrinsic functions in DATA 84 pointers can be initialized in a DATA stmnt subprograms 215 INTERFACE TO 2
177. n 77 Cray Fortran 77 76 extensions 104 Cray Fortran 90 77 create library option 36 39 40 cross reference 10 arrays 59 common blocks 62 66 68 common block objects 70 constants 58 derived types 58 entries 56 68 external files 69 include files 70 intrinsic procedures 56 labels 58 max number of references 120 module data 70 module derived type 70 modules 69 namelists 61 operators 62 procedures 61 68 program 39 40 67 program units 34 56 records 60 subprograms 61 68 table 9 10 variables 59 Ctrl C 39 Cyber NOS VE Fortran 76 extensions 105 INDEX DATA operation code 60 date format 50 52 DC option 31 DE option 31 DEBUG packets 108 DEC FORTRAN extensions 105 DEC Fortran 90 77 DEC FORTRAN for Open VMS Alpha 76 DEC FORTRAN for Ultrix and DIGITAL UNIX 76 DEC PDP 11 Fortran 77 76 extensions 105 DEC VAX Fortran 76 default compiler emulation 51 directories 51 editor 51 file name extensions 51 line numbering 52 options 51 statement numbering 52 default 2 byte integers and logicals option 32 default 4 byte integers and logicals option 33 default 8 byte integers and logicals option 33 default options 16 default REAL 8 option 31 33 defaults 51 changing 51 define symbols option 18 37 defined operation code 60 derived type cross reference 58 unreferenced 58 DF option 18 37 Digital Research Fortran 77 76 extensions 105 directive 78 key 78
178. n active DO variable e The dummy procedure argument is an output or input output argument and will modify the actual argument which is an active DO variable possible invalid assignment act arg is constant or expression e The procedure might modify this argument possible invalid assignment var more than once in act arg list e The variable occurs more than once in the actual argument list and might be modi fied during the reference possible invalid assignment actual arg is active DO variable e The actual argument is an active DO variable and might be modified during the procedure reference no INTENT specified specify INTENT IN in the referenced subprogram dummy argument must not be OPTIONAL optional dummy argument unconditionally used 164 612 613 614 615 616 617 618 622 623 APPENDIX D MESSAGE SUMMARY An optional dummy argument may only be referenced defined allocated or deal located if it is present in the actual argument list of the referencing program unit unless as an actual argument of a procedure reference if the corresponding dummy argument is also optional and not a pointer actual argument is an optional dummy argument the dummy argument not e The procedure is unconditionally referenced while the actual argument is an op tional dummy argument of the referencing procedure which may not be present optional dummy argument expected INTENT not allowed for pointer arguments INT
179. n an equivalence list is in a common block the objects cannot be equivalenced equivalence of variable to itself e The equivalence lists are such that you try to equivalence an object to itself 236 238 239 240 241 242 243 244 245 246 247 248 E E 139 storage allocation conflict due to multiple equivalences equivalence of arrays with possibly different type lengths e When using short integers and or logicals this code may be highly non portable invalid storage association of object with a pointer component e A variable of a derived type with pointer components must not be used in EQUIVA LENCE or COMMON invalid extension of COMMON through EQUIVALENCE e An object in a common block is in such a way equivalenced with an array that storage must be allocated before the start of the common block extension of COMMON through EQUIVALENCE e An object in a common block is in such a way equivalenced with an array that the common block has to be extended nonstandard mixing of types in EQUIVALENCE e Character and numeric data must not be equivalenced e Objects of type character must be of the same kind e Objects of an intrinsic non default kind must be of the same type and kind e Objects of a sequence derived type that is not a numeric sequence or character sequence type must be of the same type and have the same type parameter values more constants than variables e More constants th
180. n external procedure that has an interface body a recursive procedure reference in its own scoping unit or a dummy procedure that has an interface body explicit type The type of a name when specified by a type statement expression A sequence of operands operators and parentheses It may be a variable a con stant a function reference or may represent a computation extension See Filename extension extent The size of one dimension of an array external file A sequence of records that exists in a medium external to the program external i o I O operations performed on an external file external procedure A procedure that is defined by an external subprogram or by means other than Fortran external subprogram A subprogram that is not in a main program module or another sub program field An atomic unit of a record Fortran 77 extension It corresponds to a substructure a variable or an array element file An internal file or an external file file access type The way an external file is accessed sequential direct or stream file name extension The denotation of a file type by extending the file name with a delimiter followed by a number of characters FORCHECK A computer program to validate Fortran source programs through static analysis format type The way the data is stored in an external file formatted or unformatted For matted stored as printable characters e g ASCII or EBCDIC Unformatted st
181. n of the value of a complex number consisting of an ordered pair of real data items separated by a comma and enclosed in parentheses The first item rep resents the real part of the complex number the second represents the imaginary part component A constituent of a derived type conditional compilation Source code lines can be either included in the compilation process or be left out by applying a compiler directive and a command line option The simplest com piler directive to tag lines to compile conditionally is a D in the first column of the source line configuration file A file containing instructions to adapt a program to the user s requirements conformable Two arrays are said to be conformable if they have the same shape A scalar is conformable with any array conformance A program conforms to the standard if it uses only those forms and relation ships described therein and if the program has an interpretation according to the standard A program unit conforms to the standard if it can be included in a program in a manner that allows the program to be standard conforming constant A data object whose value must not change during execution of a program It may be a named constant or a literal constant constant expression An expression satisfying rules that ensure that its value does not vary during program execution construct A sequence of statements starting with an ASSOCIATE DO FORALL IF SELECT CASE SELECT
182. n the Add file s toolbar icon or right click in the project window and select Add file s The file select box pops up 4 1 4 Adding all files in a directory to the project To insert all files in a directory of a category recursively to the project use this action This operation is recursive so all files in the subdirectories are also added 4 1 USING THE IDE 27 4 1 5 Removing files from the project To remove files from the project select the files to remove by clicking on the filenames in the Project window and select Project Remove file s from the Menu bar click on the Remove file s toolbar icon press delete or right click on one of the selected filenames and select Remove file s The selected files are removed from the project but not deleted 4 1 6 Setting default and project options By setting options you can tune the analysis and output to your needs By default FORCHECK applies the options as factory determined You can change these defaults by selecting Op tions Default options from the Menu bar For each project you can overrule these defaults by setting project options For each specific source input and reference library file you can overrule these project options again by setting file options To set project options select Options Project options from the Menu bar The Project options window appears and you can check or uncheck each enabled option For a description of the options see the section Options 4
183. names up to 4096 significant charac ters FORCHECK considers only the first 64 characters as significant The Apollo Domain compiler accepts by default in line comment between curly brack ets 3 FORCHECK no longer supports this form of comment For the Apollo Domain compiler you can specify the in line comment character using the inline option In FOR CHECK you can enable the exclamation mark as the start of in line comment by enabling extension 6 in the configuration file Apollo Domain Fortran supports C string backslash editing when the uc compiler option has been enabled FORCHECK supports backslash editing if extension 42 has been enabled in the configuration file The INCLUDE line and the compiler directives include eject list nolist are supported 104 APPENDIX A SUPPORTED FORTRAN SYNTAX Conditional source input lines can be specified starting with D or Debug A 7 Compaq Fortran extensions Compaq Visiual Fortran formaly Digital Visual Fortran supports most DEC Fortran and Mi crosoft Fortran Powerstation Fortran extensions The compiler directive OPTIONS will be recognized but the specified qualifiers will have no effect cpp preprocessing is supported with limitations The keyword VIRTUAL is supported but the limitations in usage will not be checked DEC FORTRAN 4 synonyms for Fortran 77 keywords in OPEN and CLOSE are supported but are flagged Type attributes are skipped except f
184. ne must not be a continuation line e The line is the first line encountered in the statement and has not a zero or blank in column 6 invalid characters in front of continuation line e Characters have been found in column 1 5 of a fixed form continuation line first line after an INCLUDE line must not be a continuation line too many continuation lines e The statement has more continuation lines than the emulated compiler can handle 126 46 47 48 49 50 51 52 53 54 35 56 57 58 59 60 61 62 63 Z FZ E APPENDIX D MESSAGE SUMMARY e The statement has more than 19 continuation lines and the Fortran 77 standard option has been specified e The statement has more than 19 continuation lines and the Fortran 90 or 95 standard option has been specified and the source is in fixed form e The statement has more than 39 continuation lines and the Fortran 90 or 95 standard option has been specified and the source is in free form unrecognized characters at end of statement e After processing the statement there were characters left in the statement buffer statement field empty CONTINUE assumed invalid characters in label field of statement e Only a label in column 1 5 and a zero or blank in column 6 are allowed in front of a statement continuation character not in Fortran character set lower case character s used nonstandard Fortran comment used conditional compilation or D_line s used
185. nfiguration file count_mode statement count_mode new_in_sub count_mode continue_in_include Note that the mode keyword has to be placed within apostrophes You can concatenate a system configuration file with a private option file as described in the section Redefinition and suppression of messages When using the IDE you can set the line or statement numbering by selecting Options Preferences Numbering 4 17 Date and time format By default FORCHECK presents the date and time according to the ISO standard You can change this by adding a date_format or time_format option line to the configuration file in the VAR IOUS section of the configuration file The lines to be added have the form date_format format and time_format format in which format is a template for the presentation of the date and time respectively In the template for the date the day must be specified by dd the month by mm or mmm which causes a three letter mnemonic of the month to be displayed the year by yy or yyyy The year month and day codes must be separated by a character of your own choice which will be used as separator in the actual presentation In the template for the time the hours must be specified by hh or h which causes hours be low 10 to be displayed with one digit the minutes by mm and the seconds by ss The hour minutes and seconds codes must be separated by a character of your own choice which will be us
186. nfor mance ST Fortran 90 conformance F90 Fortran 95 conformance F95 Fortran 2003 conformance F03 or Fortran 2008 conformance F08 option as well FORCHECK reads the source input according to the Fortran 90 and up free source form standard Tabs are expanded to blanks before the statement is processed In fixed source form source lines are extended with blanks or truncated in the following way If a source line after expansion of tabs consists of less than 72 characters it will be extended with blanks to 72 characters This is significant for character and Hollerith constants Any characters beyond column 72 are ignored unless the analyze all columns AC option is in effect Lower case characters are converted to upper case before interpretation except within character and Hollerith constants If your compiler does not accept lower case characters tabs or form feeds or when you specify one of the Fortran standard conformance options one message only will be given for each subprogram to inform you that you used lower case characters tabs or form feeds respectively So not every lower case character tab or form feed will be flagged separately Also if you use include files only one warning for each subprogram will be presented 53 54 CHAPTER 5 ANALYSIS 5 1 2 Lay out of source code listing A source code listing is generated if a listing file has been requested and both the show pro gram unit SB and the list so
187. ng order of type length e This order could cause alignment problems on some processors extension of COMMON e This COMMON statement extends a previously declared common block with the same name size of common block inconsistent with first declaration e Named common blocks must have the same length in every occurrence The length of the common block in this occurrence is different from that as specified in the main program or as specified in the first occurrence encountered type in COMMON inconsistent with first declaration e Numeric and character objects must not be stored in the same common block The type of the objects in this occurrence of the common block is different from that in main or in the first occurrence encountered list of objects in named COMMON inconsistent with first declaration e In this occurrence of the named common block objects with different types type lengths or array sizes have been stored than in the main program or in the first occurrence encountered array bounds differ from first occurrence only specified once The common block has been specified in one subprogram only common block inconsistently included from include file s The common block has been specified in an include file at one occurrence and spec ified directly in another occurrence e The same common block has been specified in different include files invalid equivalence with object in COMMON e If more than one of the objects i
188. nits external and module procedures are listed with their type and number of arguments For functions the type with nondefault kind and length will also be presented For each procedure all program units and procedures which reference that procedure are shown Program unit and procedure types B BLOCK DATA program unit E external unknown whether subroutine or function F function M module P main program S subroutine Subcodes E elemental M module N interface P pure R recursive Intrinsic types of functions and function entries C complex CH character integer logical real N WMH typeless The total size of the local data of all program units and procedures is presented Allocatable and automatic objects are not included Cross reference of common blocks All common blocks referenced in the program are listed with all subprograms in which the common blocks have been specified A in front of a subprogram name indicates that the common block is modified directly in that program unit or procedure Mind that if a common block object is used as an actual argument of a procedure reference a modification of the common block in that procedure will not be indicated The type of the data in each common block and the common block size in bytes are pre sented When the common block has been saved this will be indicated Common block types 5 4 GLOBAL PROGRAM ANALYSIS 69 CH character N numeric When types have be
189. ns 109 Salford FTN77 Fortran 76 Salford FTN9O Fortran 77 SAVE option 33 save option 33 SB option 34 54 56 SC option 35 70 120 scalar actual argument 55 scratch file 15 39 select case max number of cases 120 selective analysis 28 setup 15 SF option 33 56 SH option 34 54 show common option 35 70 120 show module dependencies option 21 35 36 65 120 show program option 35 67 show program unit option 34 54 56 INDEX show public module data option 35 70 120 show public module derived types option 35 70 120 show reference structure option 21 35 63 65 120 SI option 35 58 60 61 Silicon Graphics MIPSpro Fortran 77 76 extensions 110 Silicon Graphics MIPSpro Fortran 90 77 Silicon Graphics MIPSpro Fortran 95 77 Silverfrost FTN95 Fortran 77 SMD option 21 35 36 65 120 SMT option 35 70 120 SMV option 35 70 120 source code 78 listing 34 54 source input file 29 continuation 29 specification 29 wild card 29 SP option 35 67 specific function 56 113 specific include option 36 specific intrinsic procedures option 33 56 SRS option 21 35 63 SRS option 21 35 65 120 SS option 34 54 ST option 22 33 43 53 54 79 statement max number of characters 120 max number of lines 120 statement function operation code 60 type code 61 statement numbering 49 52 structure 60 max nesting 120 max number of 120 undefined 119 structure com
190. nt FMT or NML expected e When in a control info list a keyword has been used all specifiers from there on must be specified using keywords END only allowed in a sequential READ or WAIT statement FILE not allowed for a scratch file RECL only allowed for a direct access file BLANK only allowed for a formatted file ADVANCE only allowed for external formatted sequential i o e The ADVANCE specifier may be present only in a formatted sequential input output statement with explicit format specification and with no internal file unit specifier EOR and SIZE only allowed in READ with ADVANCE NO or WAIT e The EOR and the SIZE specifiers are only allowed in an input statement that con tains the ADVANCE specifier with the value NO no recordsize specified must be declared EXTERNAL e The procedure name specified in USEROPEN must have been declared EXTERNAL invalid combination of specifiers 154 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 APPENDIX D MESSAGE SUMMARY e For namelist I O no format must be specified e POS and REC must not be specified both invalid usage of namelist name e A namelist specifier is only allowed in sequential read and write statements on an external file namelist name expected namelist i o only allowed on an external file extension of previously defined namelist e This NAMELIST statem
191. nterface of containing procedure 237 empty contains section 238 END statement for internal and module procedure commons 85 initialization of blank COMMON o 86 differing lengths for a named COMMON o o 87 initialization of COMMON not in BLOCK DATA A 4 TABLE WITH FORTRAN 90 95 2003 2008 LANGUAGE EXTENSIONS no FUJ SG95 SF95 HP95 INT CVF AB95 gfort g95 PATH PGI 243 244 245 247 249 250 251 252 257 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 214 215 218 219 220 221 222 225 227 228 229 230 232 233 234 235 236 236 237 238 85 86 87 ete tee tet 97 98 APPENDIX A SUPPORTED FORTRAN SYNTAX no F2003 F2008 Cray NAG XLF DEC FTN95 LF95 MSF executable statements 94 FORALL 4 4 98 debug packet statements 99 SELECT TYPE construct H 101 Watcom constructs 102 REMOTE BLOCK EXECUTE 105 ASSOCIATE H 106 ERRMSG in DE ALLOCATE H H 299 EXEC 300 bounds remapping in pointer assignment H 4 4 301 transfering an allocation typed allocation 4 4 302 SOURCE specifier on ALLOCATE 4 4 303 MOLD on ALLOCATE
192. ocatable variable can not be placed in a namelist An equivalence object must not have the TARGET attribute or be a pointee An object imported from a sub module must not be in EQUIVALENCE or COMMON E invalid initialization of entity in DATA or type statement In a blockdata program unit only common block variables can be initialized A dummy procedure argument automatic array allocatable variable and pointee cannot be initialized in a DATA or type statement In Fortran 90 a pointer can only be initialized with a pointer assignment ALLOCATE or NULLIFY statement From Fortran 95 pointer initialization is supported A component with the ALLOCATABLE attribute can not be initialized by default A variable in a pure procedure must be initialized other than by default E more than once in BLOCKDATA The common block has been specified in more than one block data program unit W mixing of character and numeric types In standard Fortran it is not allowed to store character and numeric data in the same common block W initialization of named COMMON should be in BLOCKDATA Variables in a named common block should only be initialized in a blockdata pro gram unit W invalid initialization of variable in blank COMMON 138 225 226 227 228 229 230 232 233 234 235 APPENDIX D MESSAGE SUMMARY e Variables in blank common should not be initialized more than once in COMMON objects not in descendi
193. of each program unit can be stored in library files which can be referenced and updated in subsequent FORCHECK runs to test program units in the context of the entire program 1 2 Why FORCHECK Though your Fortran compiler verifies the syntax of the input source code this check is in general far from complete FORCHECK however performs this verification as complete as 9 10 CHAPTER 1 INTRODUCTION possible at compile time And what is even more important FORCHECK not only verifies the separate program units but also the program as a whole beyond program unit boundaries Procedure types argument lists and common blocks are all verified for consistency FORCHECK saves you time and annoyance because errors are detected as early in the development process as possible As an option FORCHECK checks the conformance of your program to the FORTRAN 77 1 the Fortran 90 2 3 the Fortran 95 4 the Fortran 2003 5 or the Fortran 2008 6 standard Though most compilers have an option to reveal deviations from the standard they generally perform this in a limited way FORCHECK however reveals almost all deviations which can be detected during static analysis This is of utmost value when developing portable software The documentation composed by FORCHECK is compact and especially useful during pro gram development and maintenance The index of program units and module procedures the reference structure call tree of all subprograms
194. om that at the first reference encountered Mixing of integer and real types of equal lengths argument type inconsistent with first occurrence int real e The type of an actual argument of the dummy procedure differs from that at the first reference encountered Mixing of integer and real types of equal lengths argument type inconsistent with specification int real e The type of an actual argument differs from that in the specification of the proce dure Mixing of integer and real types of equal lengths argument type length inconsistent with first occurrence e The type length of an actual argument differs from that at the first reference en countered type length inconsistent with first occurrence e The type length of an argument of a dummy procedure differs from that at the first reference encountered e The type length of a common block object differs from that in the first list encoun tered e The type length is explicit in one instance and implicit in another argument type length inconsistent with specification e The type length of an actual argument differs from that in the specification of the procedure type of function argument inconsistent with first occurrence e The type of a function actual argument differs from that at the first reference en countered type of function argument inconsistent with first occurrence 162 585 E 586 587 588 589 590 591 592 593 APPENDIX D
195. omment char lay out 2 debug lines D H 3 debug lines A Z 4 tabs 4 5 formfeeds 4 7 cpp preprocessor directives 8 in line comment after 9 in line comment 11 any character allowed as continuation character 4 12 line may start with names 13 names with 4 4 15 names beginning with 16 built in functions beginning with H 17 names with 18 names beginning with _ A 4 TABLE WITH FORTRAN 90 95 2003 2008 LANGUAGE EXTENSIONS no FUJ SG95 SF95 HP95 INT CVF AB95 gfort g95 PATH PGI 255 132 132 254 132 132 132 132 132 132 132 99 99 255 511 511 99 a 255 99 99 255 511 511 99 a 255 31 32 31 255 255 63 31 63 31 31 32 31 255 255 63 31 63 31 31 32 31 255 255 63 31 63 31 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 f f f f f f f f IDIR 2 4 4 3 4 4 4 4 5 H 7 4 8 9 11 4 12 13 H H 4 4 4 15 4 4 16 4 4 17 18 93 94 APPENDIX A SUPP
196. on delimiter for INCLUDE line 2 Maximum number of continuation lines in fixed source form and free source form 0 unlimited so accept the maximum FORCHECK can handle 3 Maximum length of identifiers local names entry names common block names 0 un limited so accept the maximum FORCHECK can handle 4 Compiler directive strings Two strings can be specified with a maximum length of 10 characters each For cpp preprocessing one of these strings must be 5 Free form continuation characters The first character specified is the character which in dicates the current line will be continued Except in character context if the last nonblank character before a is this character the line will be continued The second character is a character which can be used to indicate a continuation line 6 First column free form comment characters Two characters can be specified which indi cate for free form input a comment line when placed in the first column A 30 2 EXTENSIONS In this section you can include the numbers of the syntax extensions you like to enable Each number must be specified on a single record optionally followed by comment within apostro phes A 30 CHANGING THE CONFIGURATION FILE 113 A 30 3 INTRINSICS FORCHECK recognizes all standard Fortran intrinsic procedures Moreover the additional in trinsic procedures as specified in the configuration file will be recognized You can modify the configuration file
197. onsisting of a set of array elements assignment statement A statement of the form variable expression association Name association pointer association storage association or inheritance associ ation 185 186 APPENDIX F GLOSSARY assumed shape array A nonpointer dummy array that takes it shape from the associated ac tual argument assumed size array A dummy array whose size is assumed from the associated actual argu ment Its last upper bound is specified by an asterisk attribute A property of a data object that may be specified in a type declaration statement batch job A number of commands placed in a file and submitted to be processed blank common An unnamed common block block A sequence of executable constructs embedded in another executable construct bounded by statements that are particular to the construct and treated as an integral unit block data program unit A program unit that provides initial values for data objects in named common blocks bounds For a named array the limits within which the values of the subscripts of its array elements must lie byte A storage unit generally consisting of eight bits which can contain a single character call tree See reference structure character A letter digit or other symbol character length parameter The type parameter that specifies the number of characters for an entity of type character character string A sequence of characters c
198. or ALLOCATABLE which is processed to allow for allocatable arrays The limitations and consistency in usage of the attributes are not verified A 8 Control Data 4000 Fortran extensions The Control Data 4000 Fortran compiler accepts the extended precision REAL 16 type specification These data will occupy 16 bytes but will be interpreted as double precision REAL 8 A 9 Convex Fortran extensions The VAX FORTRAN extensions are enabled by default Convex Fortran vfc option To disable these options or enable the Sun Fortran extensions adapt the configuration file The INCLUDE line and the include preprocessor directive are supported The OPTIONS directive is accepted but the options specified will have no effect The C DIR compiler directive is treated as comment Though Convex Fortran accepts names up to 42 characters FORCHECK considers only the first 32 characters as significant A 10 Cray Fortran 77 extensions The Cray Fortran 77 compiler accepts type specifications with length modifiers but inter prets INTEGER 2 4 8 as 64 bit integers LOGICAL 2 4 8 as 64 bit logicals REAL 4 8 as 64 bit reals They occupy a full 64 bit word REAL 16 COMPLEX 8 and COMPLEX 16 data occupy two words 128 bits A 11 CYBER NOS VE FORTRAN EXTENSIONS 105 The CDIR directives are treated as comment and have no effect Though Fortran 90 and FORCHECK do Cray Fortran 77 does not allow an ENDDO statement to be labeled
199. or complex to integer e Precision is lost due to conversion to integer object undefined e An attribute is specified for an object which has not been specified type length of element inconsistent with first element e The type length of this array element is inconsistently specified compared to that of the first element One has the default length the other has an explicitly specified type length scalar default character expression expected a procedure cannot have the POINTER or TARGET attribute more than once in derived type parameter list the VALUE attribute can not be specified for this object e The VALUE attribute can only be specified for a scalar dummy argument e The VALUE attribute can not be specified for a character datum with a length other then one a protected object must not be changed outside its module module procedure not referenced from outside its module e The module procedure can be declared private END INTERFACE statement missing source expression not allowed for a typed allocation e type spec and a source expression cannot be specified both only one source expression allowed in a sourced allocation 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 171 e SOURCE and MOLD cannot be specified both declared RECURSIVE but not recursively referenced ancestor or parent sub module name missing interface name missing abstract
200. ords in DATA 82 Subobjects of constants in DATA H 83 intrinsic functions in DATA 4 84 pointers can be initialized in a DATA stmnt 4 231 procedure pointers 4 4 239 PROTECTED 4 4 240 C binding and enumerators H z 241 VALUE H H 242 VALUE for arrays Extensions 40 and 42 are mutually dependent If both are enabled backslash editing is only applied for xxx C string A 4 TABLE WITH FORTRAN 90 95 2003 2008 LANGUAGE EXTENSIONS no FUJ SG95 SF95 HP95 INT CVF AB95 gfort g95 PATH PGI 21 22 23 26 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 52 53 35 56 59 61 62 64 66 67 68 69 70 71 72 73 108 77 81 82 83 84 231 239 240 241 242 et tt 95 96 APPENDIX A SUPPORTED FORTRAN SYNTAX no F2003 F2008 Cray NAG XLF DEC FTN95 LF95 MSF 243 type parameter enquiry si 244 TS 29113 further interop of Fortran with C 245 allocatable structure components TR 15581 247 access spec of components E 249 procedure components de 250 type bound procedures 251 IMPORT statement 252 pointer INTENT attribute op q 257 renaming of operator
201. ored in internal computer representation FORTRAN An acronym of Formula Translation denoting a higher computer language FORTRAN 77 The American National Standard Programming Language FORTRAN as specified by the American National Standards Institute in document X3 9 1978 fortran 90 The Standard Programming Language Fortran as specified by the ISO 1539 1991 E document 190 APPENDIX F GLOSSARY fortran 90 The Standard Programming Language Fortran as specified by the ISO 1539 1 1997 E document fortran supplied procedure See intrinsic function function A procedure that is invoked in an expression function result The data object that returns the value of a function function subprogram A sequence of statements beginning with a FUNCTION statement that is not an interface block and ending with the corresponding END statement generic identifier A name that appears in an INTERFACE statement and is associated with all the procedures in the inerface block or that appears in a GENERIC statement and is associated with the specific type bound procedures global entity An entity identified with an identifier whose scope is a program global information All information on global entities that is relevant to other program units of the program global Program Analysis The analysis across program unit boundaries to verify the global entities hexadecimal constant A literal constant that is represented by a sequence of dig
202. ot allowed in formatted I O component or field name missing e No derived type components or structure fields have been specified e A structure field which is a structure must have a field name unknown component field name or type parameter A component or type parameter has been referenced which has not been declared in the derived type e A record field has been referenced which has not been declared in the structure derived type must be of sequence type derived type or components must be PRIVATE no fields specified in structure definition incorrect number of component specs in structure constructor malformed structure component e At most one of the parts of a structure component can be an array e A part name to the right of an array must not have the POINTER attribute derived type component s or binding s inaccessible e The component s or binding s of the derived type are declared private derived type is inaccessible an object with a PRIVATE type cannot be PUBLIC invalid usage of structure component or type parameter e A structure component is not allowed in an EQUIVALENCE statement e The left side part of a structure must be of derived type e A type inquiry can not be defined initialization of component or field not allowed e In Fortran 90 initialization of derived type components is not supported derived type object must be of sequence type or have the BIND attr 142 276 277 279 280
203. ou can also concatenate a system configuration file with a private option file To do so you place the lines with the redefinitions of messages in a separate file and redefine FCKCNF with the list of the two configuration files to be concatenated for example SET FCKCNF C FORCHK G95 CNF FCKOPTNS CNF In which FCKOPTNS CNF is your options file 4 14 5 Temporary suppression of messages To suppress analysis messages temporary you can insert FORCHECK directives in your source code First you have to define the mnemonic of the directive of your choice beginning with an 48 CHAPTER 4 OPERATION You specify this directive string on the compiler directive line of the Various section of the configuration file to use For example IDEC fck compiler directive strings To define fck as directive in addition to the DEC compiler directive Now you can use this directive to disable and enable FORCHECK diagnostic messages in the source code You can either suppress messages in a block of code or in a single statement To suppress messages in a block of code add a line with the directive followed by a list of the message numbers which you want to suppress each message number preceded by a minus sign To enable messages again add a line with the directive followed by a list of message numbers each preceded by a plus sign You can add online comment after the list of messages For example CHARACTER 120 CH1
204. ponent information 119 sub tree 64 65 subprogram actual argument 55 common block 68 207 cross reference 61 68 external file 69 interface 71 max number 120 number of 73 operation code 59 reference 66 reference structure 21 35 referenced 61 root 62 63 type code 57 61 68 unreferenced 34 66 subroutine see procedure type code 57 subscript max nesting 120 substring max nesting 120 substring element information 119 Sun Fortran 77 76 extensions 110 Sun Fortran 90 77 Sun Fortran 95 77 syntax analysis 54 Fortran 2003 75 Fortran 2008 75 Fortran 77 32 75 Fortran 90 75 Fortran 95 75 nonstandard 32 supported 75 tab 53 78 time format 50 52 TR option 37 tryout 16 tuning the output 49 type access 62 69 actual argument 55 56 argument 55 array 58 block data 68 208 common block 62 66 68 constant 58 entry 58 68 external file 62 69 format 62 69 function 58 61 66 68 information 55 kind 55 56 59 61 68 label 58 length 55 59 61 66 68 mixed 69 numeric 69 procedure 68 program 68 program unit 57 61 68 reference 66 variable 58 type checking 33 type kind 55 56 actual argument 55 function 61 66 68 variable 59 type length 55 56 actual argument 55 array 59 function 61 66 68 variable 59 type verification 54 types supported 111 undeclared external procedures option 32 undeclared intent option 33 undec
205. procedure each referenced procedure is presented only once and in order of occurrence in the source code The reference structure is static only and does not show the actual sequence of calls during program execution Module procedures are qualified with the name of the module from which they are referred Renamed procedures are presented by their use name The lines are being numbered and when a sub tree has already been presented a reference is made to the line at which the sub tree was presented for example 1 PROGRAM 2 SUBR1 3 SUB2 4 FUN1 5 FUN2 6 FUN21 3 SUBR2 4 SUB2 gt 3 For the reference structure all entries of a procedure are equivalent so if an entry with its call tree has been presented all next entries referenced will refer to this sub tree Unreferenced entries with their call tree are presented as separate sub trees and are num bered in a hierarchical way for example 1 PROGRAM 2 SUBR1 3 SUBR2 1 1 MAIN2 1 2 SUBR3 1 3 SUBR4 When long names are being used and the nesting is too deep for the reference structure to fit on the page the tree is continued as a separate sub tree and a reference is made to the line at which the continued tree starts for example 1 PROGRAM_LONG_NAME 2 SUBROUTINE1_LONG_NAME 3 SUBROUTINE11_LONG_NAME 4 SUBROUTINE111_LONG_NAME gt 1 1 5 SUBROUTINE2_LONG_NAME 5 3 DISPLAY OF MODULE DEPENDENCIES 65 1 1 gt Y 2 SUBROUTINE1111_LONG_NAME When a procedure has more ref
206. ptions Preferences Message Format 4 15 TUNING THE OUTPUT 49 4 15 Tuning the output The output options as decribed in the section Options determine which parts of the analysis are displayed in the listing file Moreover using the miscellanious options you can specify if you want to create a report file and if you want to present the internal table usage Beside using these command line options you can specify what information is sent to stdout is stored in the listing file and in the report file You can do this by setting keywords in the OUTPUT section of the configuration file In the following table the keywords that can be applied are listed with their meaning and default value Acceptable keyword values are TRUE and FALSE STDOUT_MSGSUM send message summary to stdout true STDOUT_METRICS send metrics to stdout false STDOUT_USAGE send internal table usage to stdout false LISTING_MSGSUM display message summary in listing file true LISTING_METRICS display metrics in listing file true LISTING_USAGE display internal table usage in listing file false REPORT_MSGSUM store message summary in report file true REPORT_METRICS store metrics in report file true REPORT_USAGE store internal table usage in report file true For example if you want to see the message summary on your screen and the metrics not you specify the following lines in the OUTPUT section of the configuration file STDOUT_MSGSUM TRUE STDOUT_METRICS
207. putation involving one or two operands operator A lexical token that specifies an operation option A sub command to select program features output file A sequential formatted file in which all information requested is stored parameter See argument path A full file specification pointer An entity that has the POINTER attribute pointer assignment The pointer association of a pointer with a target by the execution of a pointer assignment statement or the execution of an assignment statement for a data object of derived type having the pointer as a subobject pointer associated The relationship between a pointer and a target following a pointer assign ment or a valid execution of an ALLOCATE statement pointer association The process by which a pointer becomes pointer associated with a target primary An irreducible unit of data a constant variable function reference or expression enclosed in parentheses procedure A computation that may be invoked during program execution It may be a function or a subroutine It may be an intrinsic procedure an internal procedure an external procedure a module procedure a dummy procedure or a statement function procedure interface The characteristics of a procedure the name of the procedure the name of each dummy argument and the generic identifiers if any by which it may be referenced program A set of program units that includes exactly one main program program int
208. red with the dummy formal argument list of the analyzed procedure When the referenced procedure has not been analyzed the argument lists will be compared with that of the interface definition provided or with that of the first reference Verification is done as specified in the section Program unit analysis Arguments are compared for type and type parameters If the rigorous syntax analy sis RI option has been enabled and the rank or shape of array arguments differ you are informed If a dummy array argument is longer than the actual an error is presented If an actual argumentis a constant expression active DO variable an active FORALL index or if a variable is specified more than once in an actual argument list then it is invalid to re define the dummy argument in the procedure In that case the message invalid assignment will be given with the reason This check will only be performed one reference level deep If the assigned dummy argument appears in more than one argument list of the entries of a procedure this verification is only carried out as long as the entries are disjoint If a dummy argument is not defined or referenced before defined the corresponding actual argument must be defined before each reference Because FORCHECK s limited path flow analysis referenced before defined of dummy arguments will only be flagged as long as statements are guaranteed to be executed sequentially or if the rigorous syntax analysis
209. rigorous syntax analysis RI option has been enabled the function is flagged as impure 5 1 9 Program unit cross references Program unit and procedure cross references are generated if a listing file has been requested and the show program unit SB option is in effect If no program unit cross references are being generated all diagnostic messages are sent the report file and to your screen or log file An after a list of line or statement numbers in a cross reference table indicates that there are more references to that item than could be presented The cross reference table of each module and internal procedure is presented straight after its source code listing The cross reference tables of the program unit are presented after all module and internal procedures Variables in a statement context data implied do variables ac implied do variables forall indices and statement function dummy arguments are not included in the cross reference lists The cross reference tables of module and internal procedures contain locally declared objects and use associated objects from locally referenced modules only Host associated objects are listed in the host program unit cross reference tables Subprogram entries The cross reference table of entries displays the following information The name of the program unit or procedure entry 5 1 PROGRAM UNIT ANALYSIS The program unit or procedure entry type The type of the res
210. risk when porting the program to another platform 3 6 The module dependency tree FORCHECK can present the dependencies of modules as a tree You can also specify specific modules for which you want to see the dependencies show module dependencies SMD show module dependencies SMD m for the modules specified 3 7 Using library files The purpose of library files and how to use them is explained in the chapter Operation section FORCHECK library files The knowledge is needed to understand the next sections so you are invited to make this detour now 3 8 Using modules When importing modules by the USE statement FORCHECK has to import the public items of the module to analyze the code So the imported module has to be analyzed before analyzing the importing code FORCHECK stores the public module information in a library file for later 22 CHAPTER 3 TUTORIAL reference If the modules are located in front of the importing program unit or if they are in separate files and you analyze all files in one run this works fine without noticing In other cases you must analyze the referenced modules first and store the result in a FORCHECK library When analyzing the source code which references these modules you specify this library file as a reference library 3 8 1 Using third party libraries When referencing third party modules e g supplied by the compiler vendor FORCHECK needs the interfaces to perform the analysis FORCH
211. rks of Silicon Graphics Inc Lahey F77L LF90 and LF95 are trademarks of Lahey Computer Systems Inc Linux is a registered trademark of Linus Torvalds Microsoft MS DOS MS Fortran Microsoft Fortran PowerStation Windows 95 and Windows NT are trademarks of Microsoft Corporation MicroWay and NDP Fortran 386 are trademarks of MicroWay Inc NAG and NagWare are trademarks of The Numerical Algorithms Group Limited Prospero Fortran and Pro Fortran 77 are trademarks of Prospero Software Ryan McFarland and RM Fortran are trademarks of Ryan McFarland Corporation Sun and Solaris are trademarks of Sun Microsystems Inc WATCOM is a trademark of Sybase Inc All other trademarks and registered trademarks are the property of their respective holders Website http ww forcheck n1 Email info forcheck nl Contents Contents 1 2 3 Introduction Installation 2 1 The CISTEIBUON kit sia a ew ee Soe ee OS Eik ee w 2 2 Password protection and support 0 0c eee ee ee raks 2 3 Required configuration 6 6 06 ok ee kee ee ew ee ee 24 Installino FORCHECK somo a ee Se ae ee ee ee ey Jase WOE 6 466 4 ANA 20 MUMS TANG oo al oak oe Gea Hh ae Re a he a a eke a E e E e 27 Installation directory 2002000006 ke iaaii a ee 200 MISCY SEUMINGS iio da tado eR EE aA e RS ee ed E 2 TO Scratch Mess sa ods kek a aa Se ee a da See el el wy E a SoU maude Ules ala he Sk a hel eee We A a a we ee a 2 12 Adaptation to your Fortran
212. ro Fortran 77 extensions cpp preprocessing is supported with limitations The SGI Fortran 77 compiler accepts the extended precision REAL 16 type specification These data will occupy 16 bytes but will be interpreted as double precision REAL 8 By default the SGI Fortran 77 compiler supports C string backslash editing This can be disabled using the compiler option backslash FORCHECK supports backslash editing if extension 42 has been enabled in the configuration file which is the default for the SGI compiler emulation SGI Fortran 77 supports recursive subprogram references when the automatic compiler option is specified during compilation In FORCHECK extension 229 is enabled in the compiler emulation file to allow for recursion A 27 Sun Fortran 77 extensions cpp preprocessing is supported with limitations The tab is supported but does not imply the analysis of characters beyond column 72 The default maximum number of continuation lines for the Sun compiler is 19 This maximum can be increased using the N1n option FORCHECK also allows a maximum of 19 continuation lines by default FORCHECKS maximum can be increased up to 999 using the cont n option By default Sun Fortran supports C string backslash editing This can be disabled using the compiler option x1 FORCHECK supports backslash editing if extension 42 has been enabled in the configuration file which is the default for the SUN compiler emulation
213. rst bound of a specified shape is higher than the second bound e Array must not be zero sized in this context shape specification out of order e The shape must be specified before first usage multiple specification of shape e The shape of the array has been declared more than once invalid array or coarray specification invalid usage of assumed size array specification e Only dummy array arguments can be specified with an assumed size e The function name of an array valued function must not be declared assumed size invalid usage of assumed size array name e An assumed size array name can only be used as an actual argument in a procedure reference for which the shape is not required invalid usage of adjustable array dimension e Only dummy array arguments can be specified with adjustable dimensions invalidly used in adjustable or automatic type declaration 177 178 179 180 182 183 184 185 186 188 189 133 e A variable which specifies an array dimension or character length must either be a procedure argument with intent in in common or a global module variable deferred or assumed shape array specification not allowed deferred shape array specification required e A POINTER or an ALLOCATABLE array must be specified as a deferred shape array explicit shape array specification required e An array valued function result without the POINTER or ALLOCATABLE attribute must have an explicit shape
214. rtran files on the current sub directory After having specified all source input files FORCHECK prompts for library files The de fault is that you don t specify a library file In that case FORCHECK will store all inter program unit information in a scratch file which will be deleted when FORCHECK has completed You can however save this inter program unit information by specifying a library file In subse quent FORCHECK runs you can update this library file and reference or include the program units of one or more library files See the section FORCHECK library files for detailed infor mation The library files specified must be separated by a When you specify a as the last character on the line FORCHECK prompts for more library files You can use wild cards to reference a group of library files 4 2 2 Command line Entry With command line entry you enter the FORCHK command along with its arguments without waiting to be prompted You must separate each complete argument from the next with a comma Apart from this what you enter is the same as with interactive entry The command syntax is therefore the following FORCHK listing_filel global_ options input_file local_options input_file local_options lib_file lib_option lib_file lib_option See the section Using FORCHECK in interactive mode for a full description of these arguments 30 CHAPTER 4 OPERATION To accept the default for an
215. ruct invalid transfer of control out of construct invalid list of edit descriptors scalar character constant expression expected ancestor module must not be intrinsic module nature conflict sub module not found inconsistent attribute inconsistent dummy argument name inconsistent characteristics intrinsic module has the same name as a nonintrinsic module nonintrinsic module has the same name as an intrinsic module variable used as actual argument unreferenced e The variable is defined through an actual argument in a referenced procedure but not referenced in the referencing program unit scalar default character constant expression expected 178 863 864 865 866 868 869 870 871 872 873 874 875 876 877 878 APPENDIX D MESSAGE SUMMARY inconsistent BIND C attribute or binding label e When a common blockor external procedure has been specified with the BIND C attribute in a certain subprogram it must be specified with the BIND C attribute and the same binding label in every subprogram in which the common block or external procedure has been specified binding label is not unique initialization expression expected an assumed type entity must be a dummy variable an assumed type variable can only be used as an actual argument an assumed rank variable can only be used as an actual argument assumed shape or assumed rank argument expected assumed rank entity must be a dummy variable
216. ry 2 8 User settings User settings are stored in the subdirectory forcheck of the APPDATA directory e g on Win dows XT Documents and Settings user Application Data Forcheck or on Windows 7 Users user AppData Roaming Forcheck 2 9 SETUP 15 2 9 Setup You can tune FORCHECK for Windows to your needs in the IDE See the chapter Operation You also can perform this without using the IDE by specifying some keywords and values in the FORCHECK configuration file forchk cfg which must be in the FORCHECK above mentioned user settings directory If this configuration file is not present FORCHECK for Windows inspects the environmental variables with the same name as the configuration file keywords See the next sections 2 10 Scratch files FORCHECK stores some information in scratch files You can specify the path at which these scratch files are stored with the keyword TMP for example TMP C TMP By default FORCHECK places the scratch files on the current directory 2 11 Include files You can instruct FORCHECK to search for include files on additional paths by specifying the keyword INCLUDE for example INCLUDE C INCL More than one include path can be specified by separating the paths by a See the chapter Operation section The usage of include files for the search strategy for include files 2 12 Adaptation to your Fortran Compiler FORCHECK can emulate the syntax and data types of several compilers See
217. s FORCHECK detects type conflicts In general the typing rules are applied more strictly than most compilers do Type checking is relaxed for type less data 5 1 PROGRAM UNIT ANALYSIS 55 and if the relax type checking RE option has been enabled FORCHECK signals implicit type conversions if they impose a certain risk A character datum that is converted to a shorter type or an integer that is converted to a shorter integer truncation Areal or complex expression that is converted to a type of less precision A complex expression that is converted to a real Areal expression that is converted to a complex A literal constant that is specified in a type with less precision than that of the target This check is relaxed for the value zero If you specify the rigorous syntax analysis RI option any implicit type conversion will be flagged Moreover padding of character variables with blanks will be flagged unless the right hand side of the assignment statement is a character constant with zero length or consists of blanks only 5 1 5 Local verification of argument lists Within a program unit the argument list of each reference of a procedure is compared with the declared interface if the interface is explicit If the interface is implicit FORCHECK tries to locate the interface in the temporary and specified library files If the interface is not found the argument list is compared with that of the first reference The num
218. s an array array versus scalar conflict e The argument of a dummy procedure is an array name while at a previous reference the argument was a scalar or vice versa arg is an array element while it was an array in the previous ref arg is an array while it was an array element in the previous ref 594 595 596 598 599 600 601 602 603 604 605 606 607 608 609 610 163 the actual argument is an array element while the dummy is an array shape of argument differs from first occurrence shape of argument differs from specification shape of argument differs from specification actual array or character variable shorter than dummy e The array or character datum as specified in the procedure is longer than the size specified the referencing program unit array or character length differs form first occurrence attributes of argument inconsistent with first occurrence attributes of argument inconsistent with declaration invalid assignment actual argument is constant or expression e The dummy procedure argument is an output or input output argument and will modify the actual argument invalid assignment variable more than once in actual argument list e The variable occurs more than once in an actual argument list so it must not be modified The dummy procedure argument is an output or input output argument and will modify the actual argument invalid assignment the actual argument is a
219. s and the program as a whole 1 1 What does FORCHECK do FORCHECK verifies the syntax by parsing the source program This is done as precisely as possi ble at compile time The full Fortran 2008 syntax which includes the Fortran 2003 Fortran 95 Fortran 90 and FORTRAN 77 syntax is supported Moreover most language extensions of many compilers are accepted As an option the syntax can be checked for strict conformance to the FORTRAN 77 the Fortran 90 the Fortran 95 the Fortran 2003 or the Fortran 2008 standard Cross reference tables of all objects within program units are composed Information and warnings concerning the usage of all objects are provided The reference structure call tree of the program can be analyzed and presented Recursive references are traced and verified The persistence of common block objects and global module data is verified The consistency of the entire program is verified by checking the category and type of the procedures and the argument lists of all procedure references Length type and structure of the common blocks specified in the various program units are compared Cross reference tables of all procedures common blocks common block objects modules public module data external I O and include files over the program are composed FORCHECK can emulate a specific compiler by reading a configuration file in which all types and language extensions to be supported are enumerated The global information
220. s are accepted Some of them are processed and have the expected effect such as LIST PAGE ANSI Others have no effect on the Forcheck analysis such as ALIAS INLINE etc cpp preprocessing is supported with limitations A 18 IBM AIX XL FORTRAN extensions The XL Fortran compiler has no limit on the length of source records in free form mode Forcheck only reads a maximum of 256 characters Though the XL compiler accepts tabs a tab before a continuation character is not sup ported FORCHECK accepts a tab before a continuation character The XL Fortran Fortran compiler accepts names up to 250 significant characters FOR CHECK considers only the first 64 characters as significant By default in FORCHECK the maximum length for type character is set to 32767 for the XL compiler emulation The default for the XL Fortran Fortran compiler however is 500 A larger length for type character for the XL Fortran compiler is allowed by specifying the CHARLEN len compiler option or the qcharlen num command line flag You also can adapt the FORCHECK configuration file used to have FORCHECK flag the usage of character lengths larger than 500 The free form source syntax is not fully supported A continuation character in front of the on line comment character is not always detected cpp preprocessing is supported with limitations The PROCESS directive will be accepted but the compiler options specified have no effect
221. s in USE statement 259 allocatable scalars 260 deferred character length 261 F2003 specification and initialization expressions 262 PROCEDURE y 263 mixing of subroutines and functions in generic 264 allocatable dummy arguments TR 15581 265 CONTIGUOUS attribute 266 implied shape array 267 initialization of pointer with target 268 maximum rank 15 269 after PROCEDURE allowed 270 type extension a 271 parameterized derived type 272 deferred binding and abstract type 273 polymorphic entities CLASS statement 274 TYPE statement for intrinsic type 275 empty type bound procedure part 276 list of type bound procedures 277 omitting an all component in a structure con structor program units subprograms interfaces 214 IMPURE 215 INTERFACE TO 218 PURE 219 ELEMENTAL 220 argument list in PROGRAM statement 221 type len FUNCTION name 222 type FUNCTION name len O o 225 Unisys internal subprograms 227 END INTERFACE name 228 STDCALL 229 recursive reference of all procedures allowed 230 intrinsic modules USE NON_ INTRINSIC 4 232 SUBMODULE 233 ABSTRACT INTERFACE a 234 Data in main or module are saved implicitly 235 allocatable function result TR 15581 3 236 defining i
222. s whether it is used to transfer data into the procedure out of the procedure or both interface block A sequence of statements from an INTERFACE statement to the corresponding END INTERFACE statement inter subprogram information All information on subprograms which is relevant to other program units of the program global information interactive entry Specification of program commands and options through a query interface of a procedure See procedure interface internal file A character variable that is used to transfer and convert data from internal stor age to internal storage internal i o I O operations performed on an internal file internal procedure A procedure that is defined by an internal subprogram internal subprogram A subprogram in a main program or another subprogram intrinsic An adjective applied to types operations assignment statements procedures and modules that are defined in the standard and may be used in any scoping unit without further definition or specification i o Pertaining to either input or output or both i o list A list of items in an input or output statement specifying which data is to be read or to be written i o operation code A symbol denoting the category of input output operation performed keyword An argument keyword or a word with a special predefined meaning for the com piler kind type parameter A parameter whose values label the available kinds of an intr
223. s which if accepted by your compiler impose no risk to the proper execution of the program while errors indicate constructions which may influence the proper execution All analysis messages have a number In the manual appendix Message summary you will find a list of all messages with explanation for those messages which are not self explanatory During program unit analysis the analysis message is followed by the source line number and file name to be able to locate the source of the problem in the source file easily To use this fea ture you should however not change the method of line or statement numbering as described in the section Line or statement numbering The following remarks can be made on the presentation of analysis messages Only the first 6 analysis messages in a statement are presented unless the rigorous syntax analysis RI option has been specified Only the first 6 problems encountered in an argument list or common block are presented unless the rigorous syntax analysis RI option has been specified 4 14 MESSAGES 47 4 14 3 System messages When a problem arises in FORCHECK itself like overflow of a buffer a system message in capitals between parentheses will show for example 5 0 TOO MANY PROGRAM UNITS REMAINDER NOT PROCESSED A system message is flagged with an O overflow or an E error Analysis will proceed after an overflow message the analysis however is no longer complete
224. se files to the project for editing and searching The IDE can automatically add these files to the project Select Project Update include dependencies from the Menu bar to add or update the include files of the project The fourth category consists of an optional FORCHECK library file to be created or updated The fifth category consists of optional FORCHECK library files to be referenced Library files are discussed in the section FORCHECK library files The default file name extension for FORCHECK library files is f1b The sixth category is an optional listing file with default file name extension 1st When specifying a listing file all source listings cross reference tables and FORCHECK messages are placed in the listing file If no listing file has been specified all messages are send to the report window and report file only The seventh category is an optional report file in which a review of the analysis will be stored The default file name extension of the report file is rep If no report file is specified the review is displayed in the report window The last category is an XML file in which the reference structure call tree is placed The default extension is xml See the chapter Analysis section Reference structure in XML format All these files are presented in a tree To add files to the project first select the appropriate file category type by clicking on it Then select Project Add file s from the Menu bar click o
225. setts December 1979 PDP 11 FORTRAN 77 Language Reference Manual Digital Equipment Corporation AA L979 TC Maynard Massachusetts September 1981 VAX FORTRAN Language Reference Manual Digital Equipment Corporation AA D034E TE Maynard Massachusetts June 1988 VAX FORTRAN User manual Digital Equipment Corporation AA D035D TE Maynard Massachusetts June 1988 FORTRAN for RISC FORTRAN Language Reference Manual for RISC Processors AA NA31A TE Digital Equipment Corporation 1989 FORTRAN for RISC Guide to FORTRAN Language Programming for RISC Processors AA NA30A TE Digital Equipment Corporation 1989 181 182 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 APPENDIX E REFERENCES DEC Fortran Language Reference Manual AA PU45A TK Digital Equipment Corporation Maynard Massachusetts 1992 DEC Fortran 90 Language Reference Manual AA Q66SB TK Digital Equipment Corpora tion Maynard Massachusetts 1995 Digital Fortran Language Reference Manual AA Q66SC TK Digital Equipment Corpora tion Maynard Massachusetts 1997 Compaq Fortran Language Reference Manual AA Q66SD TK Compaq Computer Corpo ration Houston Texas 1999 VS FORTRAN Version 2 Release 5 Language and Library Reference IBM fifth edition august 1989 SC26 4221 5 VS FORTRAN Version 2 Release 4 Programming Guide IBM fifth edition august 1989
226. specifiers 165 RECL for sequential files 166 RECL not required if STATUS OLD format specifiers and edit descriptors 175 noncharacter array name allowed o o o o o o 176 variable length fields lt gt 177 aEw dDe double precision exponent 178 aQwl d quadruple precision mantissa 179 aOw m octal edit descriptor 180 aZw hex edit descriptor 181 aZw m hexadecimal edit descriptor 182 aR w char edit descriptor o 183 edit descriptor 184 Q edit descriptor 185 edit descriptor 186 aBw m binary edit descriptor 189 Zero field width in edit descriptor compiler directives 200 INCLUDE 201 OPTIONS 203 OPTION N BREAK 204 EJECT 205 NO LIST 206 COMPILERC A 3 TABLE WITH FORTRAN 77 LANGUAGE EXTENSIONS no SGI SUN HP9 DEC CD4 RM RM2 MS5 LH PF NDP FTN WAT AB F2C 116 117 118 119 120 121 125 126 127 128 129 130 131 132 133 140 141 142 143 144 145 146 147 148 155 156 157 158 165 166 175 176 177 178 179 180 181 182 183 184 185 186 189 200 201 203 204 205 206 00064 o 00064 o oOo 0 89
227. statement is not referenced entity declared in include file not used e An external namelist or local variable has been declared in an include file but is not used in the current subprogram subscript out of range array array extent or character variable is zero sized e The array extent is zero e The first bound of a specified shape is higher than the second bound e The first substring value is higher than the second substring expression out of range invalid substring invalid usage of substring referenced character elements defined e In Fortran 77 none of the character positions defined may be referenced in the same statement division by zero invalid power execution e It is invalid to raise a negative number to a real exponent types do not conform typeless data used in invalid context e Octal hexadecimal and Hollerith data should only be used in DATA or PARAMETER statements implicit conversion to shorter type 146 338 339 340 341 342 343 344 345 346 347 APPENDIX D MESSAGE SUMMARY e The type length of the variable is shorter than the resulting type length of the ex pression character variable padded with blanks integer overflow in expression equality or inequality comparison of floating point data e Because of limited precision and different implementations of real and complex numbers the result of this comparison may be unpredictable eq or ineq comparison of float
228. stings of public module data See also the section Cross reference of public module data of the chapter Analysis Default NOSMV show public module data SMV m Show cross reference listings of public module data of specified modules The specified mod ules must be separated by a Default NOSMV show module dependencies SMD Show the dependencies of modules Default NOSMD 36 CHAPTER 4 OPERATION show module dependencies SMD m Show the dependencies of specified modules The specified modules must be separated by a gt Default NOSMD 4 3 4 Library options create library CR Create a new library and insert the analyzed program units in this library This is a command line option only Default NOCR include IL Include all program units from the library in the analysis Default NOIL specific include IL s Include specified program units from the library file in the analysis Default NOTL update library UP Update the specified library with the analyzed program units Default NOUP 4 3 5 Miscellaneous options batch BA Exit if errors occur during command input and suppress the Press enter to continue prompt at exit When FORCHECK is started from a batch file this option suppresses interactive handling of command input errors and exit This is a command line option only Default NOBA include dependencies 1D d Generate a file with all referenced include files Default NOID
229. sub module this statement can only be used within a construct this statement can only be used within a loop construct statement not allowed within this context statement out of order type specification out of order e The type specification must confirm the implicit type or be defined before the dec laration statement where it is used non DATA specification statements must precede DATA statements e In Fortran 77 any DATA statement should be placed after other specification state ments no shape specified or statement function out of order e An undeclared subscripted variable or function name with arguments is used at the left side of an assignment statement this statement cannot have prefixes e Only a FUNCTION or SUBROUTINE statement can have prefixes 128 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 APPENDIX D MESSAGE SUMMARY internal or module procedure expected e After a CONTAINS statement at least one internal or module procedure must be specified no path to this statement procedure END missing program unit END missing non matching program unit or subprogram type in END non matching name in END missing delimiter or separator unmatched parentheses missing parenthesis expected expected syntax error nonstandard Fortran syntax obsolescent Fortran feature e This syntax is marked as obsolescent
230. supply FORCHECK with the appropriate command input In that case type FORCHK response file to start FORCHECK The command input is now read from the response file instead of from your keyboard When in interactive mode you can continue command input from a response file by typing response file as the response to a prompt 4 3 Options Options can be set for an entire project and for each individual file File options overrule the project options We distinguish five categories of options options to tune the program unit analysis options to tune the global analysis listing options library options and miscellaneous 4 3 OPTIONS 31 options Library options can only specified for library files so they do not show up in the project and source file options windows In the following list the mnemonics between parentheses are the corresponding command line options 4 3 1 Program unit analysis options analyze all columns AC Analyze all columns of the source input records If negated and the ff option is not in effect only columns 1 to 72 after expansion of tabs will be analyzed See also the sections Interpre tation of source code records and Lay out of source code listing of the chapter Analysis Default NOAC use acquired interface AQI Use the interface of the previously analyzed subprogram with an implicit interface if present to verify the references during subprogram analysis If negated the actual argument lists
231. t a listing file is added to the project by default You can view this file by double clicking on it or select it and press view on the toolbar When using the commandline the syntax is forchk listfile sourcefile e g forchk mylistfile mysourcefile for or combined with some options forchk mylistfile FF NOINF mysourcefile for Now you have analyzed your first source code it is time to experiment with the available options which are described in the chapter Operation You can tune the analysis and the output just try 3 3 Analyzing more than one source file To add source files to the project select the appropriate file category Fortran source files Then right click and select Add file s or choose add files from the toolbar The file select box pops up You can select the files you like to add The project options you have selected hold for the entire analysis If you like to specify certain options for a specific source file or for a group 20 CHAPTER 3 TUTORIAL of source files you can specify file options for those source files Select the source files select options file options You also can select the files right click and choose File options from the pop up menu You now can start the analysis by clicking on the Analyze all files tool bar icon The F check FULL icon The FORCHECK analyzer will be started and the analysis is carried out When using the commandline the syntax is forchk listfile options sourcef
232. t analyzed 67 operation code 59 reference 66 reference structure 21 35 65 referenced 61 root 62 63 template 71 type code 57 61 68 unreferenced 34 66 206 procedures not analyzed max number 120 PROCESS 107 process D lines option 31 Professional Fortran 76 program unit argument list 55 cross reference 56 external file 69 max number 120 page number 67 project 25 add directory 26 add files 26 analysis 27 create 26 open 26 options 27 remove files 27 save 27 prompt 29 Prospero Fortran 76 PW option 34 R8 option 31 33 RE option 33 55 record cross reference 60 dimension 60 information 119 length 69 operation code 60 undefined 60 119 unreferenced 60 record field aggregate 119 information 119 recursive reference 63 reference structure 10 35 39 40 63 analysis 63 file 45 65 recursive reference 63 sub tree 64 65 xml file 34 reference structure file option 34 63 INDEX referenced common block 68 entry 61 67 external file 62 69 function 66 include file 63 label 58 operation code 60 procedure 56 61 65 67 subprogram 56 61 65 67 relax option 33 55 remove 42 report file option 37 required configuration 13 response file entry 30 RI option 33 36 44 46 54 56 63 66 119 rigorous option 33 36 44 46 54 56 63 66 119 RM option 43 RM Fortran 76 RP option 37 RSF option 34 63 Salford Fortran FIN77 extensio
233. t that is not a module external subprogram or block data pro gram unit module A program unit that contains or accesses definitions to be accessed by other program units module procedure A procedure that is defined by a module subprogram module subprogram A subprogram that is in a module but is not an internal subprogram name A lexical token consisting of a letter followed by up to 62 alphanumeric characters let ters digits and underscores Note that in Fortran 77 this was called a symbolic name named Having a name named constant A constant that has a name Note that in Fortran 77 this was called a symbolic constant nonexecutable statement A statement that describes the characteristics of the program unit of data of editing information or of statement functions but does not cause an action to be taken by the program nonstandard syntax Syntax which does not conform to the Fortran standard numeric constant A constant that expresses an integer real double precision or complex 193 number numeric type Integer real or complex type obsolescent feature A feature that is considered to have become redundant but that is still in frequent use operation code A symbol denoting the kind of operation performed on a data object operational message A message presented to signal a problem in the operation of the pro gram operand An expression that precedes or succeeds an operator operation A com
234. tab s used formfeed s used include line s used unbalanced delimiters invalid filename specification none of the entities declared in the include file is used character constant split over more than one line e This may be non portable fixed source form used no statement found in program unit e Only comment lines or non included conditional source lines were read continuation character missing e In freeform input the first nonblank character of a continuation line in a character context must be an amp unrecognized characters after compiler directive 64 65 66 69 70 71 72 73 74 75 76 77 78 79 80 81 82 127 e the cpp preprocessor does not allow characters after directives without arguments W line too long continued character constant has more than one leading blank comment line s within statement unrecognized statement e The syntaxis not recognized This may be caused by a non standard keyword which is not part of the supported extensions ambiguous statement Type statement assumed e A function statement must have an empty argument list so this statement is treated as an explicit type statement nonstandard Fortran statement statement not allowed in MAIN statement not allowed in BLOCKDATA e Ina blockdata program unit only specification statements and no executable state ments are allowed statement not allowed within the specification part of a
235. tal subprogram that do not have the VALUE attribute must be specified specific procedure has no unique argument list invalid redefinition of intrinsic operation or assignment type is not the type of the generic intrinsic function e Specifying a type for a generic intrinsic function does not in itself remove the generic property from that function generic procedure reference could not uniquely be solved argument must be an allocatable variable argument must have the POINTER attribute argument must have the POINTER or TARGET attribute none of the entities imported from the module is used module must not reference itself directly or indirectly MODULE NOT FOUND e The module information is not found e The library entry found is not a module multiple specification of sub module e A sub module with the same name has already been analyzed conflict between sub module and program unit or entry name 649 650 651 652 653 654 665 666 668 669 670 671 167 module already referenced without only or rename list invalid rename clause e No generic name operator or assignment expected e local_name gt module_name expected already imported from host or same module e The entity is in an ONLY list and has already been imported from the same module in the same or host scoping unit e The entity is already imported from the host scoping unit entity imported from more than one module do not refer
236. tandard All nonstandard syntax will be flagged Note that this option does not enable Fortran 95 syntax by itself To enable Fortran 95 syntax a configuration file of a Fortran 95 compiler must be selected Default NOF95 Fortran 2003 conformance F03 Check the syntax for conformance with the Fortran 2003 standard All nonstandard syntax will be flagged Note that this option does not enable Fortran 2003 syntax by itself To enable Fortran 2003 syntax a configuration file of a Fortran 2003 compiler must be selected Default NOFO3 Fortran 2008 conformance F08 Check the syntax for conformance with the Fortran 2008 standard All nonstandard syntax will be flagged Note that this option does not enable Fortran 2008 syntax by itself To enable Fortran 2008 syntax a configuration file of a Fortran 2008 compiler must be selected Default NOFO8 free source form FF The source file is in free source form The specific form of the free source form input depends on the compiler emulation chosen For files with a filename extension of F90 F95 FO3 F2003 F08 or F2008 the default is FF For all other files the default is NOFF default 2 byte integers and logicals 12 Default integers occupy 2 bytes by default The length of logicals will depend on the compiler emulated 4 3 OPTIONS 33 default 4 byte integers and logicals 14 Default integers and logicals occupy 4 bytes by default default 8 byte integers and logicals
237. ted to inform the user of a problem during execution of the program target A data entity that has the TARGET attribute or an entity that is associated with a pointer truncation The implicit conversion of a type to another type which occupies less storage or conversion of a representation of a real number to an integer type A named category of data that is characterized by a set of values together with a way to denote these values and a collection of operators that interpret and manipulate the values The set of data values depends on the values of the type parameters type declaration The specification of the type for the name of a constant variable or function by use of an explicit type specification statement type length The number of bytes an object of a specific type occupies type parameter A parameter of a data type type statement A statement to specify the type of a name unassigned See Undefined undefined The property of a data object of not having a determinate value unit identifier A means of referring to a file in order to use input output statements 197 unreferenced The condition of a data object that no reference is made to that object use association The association of names in different scoping units specified by a USE state ment variable A data object whose value can be defined and redefined during the execution of a program It may be a named data object an array element an array sec
238. ter the analysis has finished you can open the report file It will be displayed in the report window Now you can browse in the report window and study the results of the analysis You can step to the next or previous message using the arrows in the toolbar When you double click on a report message with file name and line number the source or include file is opened in the editor on that line so you can view and correct the problem 4 1 11 Selective analysis To selectively analyze one or more of the source files first select the files to be included in the analysis You click on the filenames in the project window and select Analysis Include in analysis from the Menu bar click on the Include in analysis tool bar icon The F icon or right click on the selected files and select Include in analysis All files which will be included in the analysis are now marked by a check icon You Start the analysis on the selected files by choosing Analysis Selective analysis from the Menu bar or clicking on the Selective analysis tool bar icon the F check icon The Com plete program option is temporary disabled during selective analysis see the section on op tions To exclude marked files for a subsequent selective analysis select the files in the project window and choose Analysis Exclude from analysis from the Menu bar click on the Exclude from analysis tool bar icon The F icon or right click on the selected filenames and select Exclude from anal
239. the Appendix Supported Fortran syntax for a list of all compilers and extensions supported By default FORCHECK for Windows emulates the Intel Fortran V11 compiler If you use one of the other compilers you must configure FORCHECK by specifying an emulation configuration file in which the proper configuration data is stored You can specify the appropriate emulation configuration file with the keyword FCKCNF for example C Program Files x86 Forcheck share xxx cnf in which xxx stands for the identification of the compiler to be emulated See the appendix Supported Fortran syntax for a list If your compiler is not on the list or if you like to define your own set of language extensions you must compose a new emulation configuration file See appendix Supported Fortran syntax section Changing the configuration file for details 16 CHAPTER 2 INSTALLATION 2 13 Specifying default options FORCHECK has a facility to specify default global options In this way you don t have to specify the options which you use normally each time you run FORCHECK You specify the default options by specifying the keyword FCKOPT for example FCKOPT PW 90 PL 66 F77 DC SH SI 2 14 Tryout You can verify if FORCHECK is functioning correctly by analyzing the demonstration program Copy the demonstration project files C Program Files x86 Forcheck share examples demo to a private directory Then open the project fckdem fpj and start
240. the dependency tree of all modules and the cross reference tables of procedures common blocks common block objects modules pub lic module data external I O and include files are indispensable whenever you deal with a program consisting of more than a few program units FORCHECK can emulate most language extensions of many compilers When you tell FOR CHECK to emulate the compiler of the target system you can use it as a conversion aid The global information of the various program units can be stored in library files You can verify newly developed or changed program units in the context of the entire program by specifying the library files containing the global program information without analyzing all source code anew In this way you can develop programs in a modular way without the risk of creating inconsistencies in the subprogram interfaces 1 3 Application Areas FORCHECK can be used to the best advantage in the following application areas Program development During program development FORCHECK signals syntax errors and presents warnings both at the program unit and program level It will detect substan tially more of the program flaws than your compiler Subsequent compilation will raise no additional error messages any more Program maintenance The optimal documentation presented specially the table of con tents the reference structure the module dependency tree and the cross reference tables will show you exactly where
241. the dummy argument list a type specification statement for the result in case of a FUNCTION procedure and a type specification for each of the dummy arguments If an argument is an input argument reference it if it is an output argument provide an assignment statement to define it and if it is an input output argument reference it first and define it later on Conclude the template procedure with an END statement For example FUNCTION MYFUNCARG1 REAL MYFUN ARG1 MYFUN ARG1 END Include the templates in the FORCHECK analysis by specifying them as an input source file or place them in a FORCHECK library file 5 5 2 Using Fortran 90 syntax Fortran 90 and up provide the appropriate syntax to specify a procedure interface You cre ate a module and define an interface block In this interface block you create one or more interface bodies to define the interfaces of procedures Each interface body should consist of the appropriate procedure statement FUNCTION or SUBROUTINE with the dummy argument list a type specification statement for the result in case of a FUNCTION procedure and a type specification for each of the dummy arguments If an argument is an input argument supply the INTENTCIN attribute if it is an output argument supply the INTENT OUT attribute and if it is an input output argument supply the INTENTCINOUT attribute which is the default For optional arguments specify the OPTIONAL attribute Conclude the interface body with
242. the library file you have to compress it Also when you add the information of more and more program units the index of the library file becomes scattered and the global program unit analysis will take more time Compressing the library file makes the index contiguous again 4 10 1 Maintaining library files from the IDE To maintain library files select Tools Librarian from the menu bar A file select box pops up and you can select the directory and filename of the FORCHECK library you want to process The default file name extension for a library file is Flb After pressing Open the Librarian window pops up You also can select a library file in the project view choose View from the toolbar or right click and select View The Librarian lists the program units which interfaces are contained in the library file To remove the interface of one or more program units select the names and activate the Remove button To compress the library activate the Compress button 4 10 2 Maintaining library files in command mode FCKLIB is a utility to maintain FORCHECK library files You can list and remove program units and compress the library FCKLIB is run by typing the FCKLIB command with a library file name and options The FCKLIB command line has the following form FCKLIB library file options where options indicates the actions to be performed In interactive mode you can enter the library file specification as a respond to the system prompt l
243. ting this option you can instruct FORCHECK to number lines or statements start numbering anew for each subprogram or file and apply hierarchical or sequential line statement numbering in include files Mind that if you choose a non default line or statement numbering the line number which is presented with analysis messages will not be suitable to locate the source of the problem in the source file automatically 4 18 8 Date time format You can choose from several formats for the presentation of date and time By selecting the XXXXXX formats you can suppress the date and or time in the page headers This is usefull when comparing listing files generated at different times Chapter 5 Analysis In this chapter we describe concisely what FORCHECK actually does and what the generated output exactly means The analysis is carried out in three stages the analysis of the separate program units the analysis of the reference structure and dependency of modules and the analysis of the integral program Command line options determine which of the analysis stages are activated Beside specifying options you can specify language extensions and analysis options in the configuration file which is in effect 5 1 Program unit analysis 5 1 1 Interpretation of source code records If you specify the free source form FF option FORCHECK reads the source input in free form as supported by the compiler emulation chosen If you specify the Fortran standard co
244. tinuation lines only The compiler directive OPTIONS will be recognized but the specified qualifiers will have no effect The keyword VIRTUAL is supported but the limitations in usage will not be checked DEC FORTRAN 4 synonyms for Fortran 77 keywords in OPEN and CLOSE are supported but are flagged A 14 Digital Research Fortran 77 extensions The INCLUDE compiler directive is supported 106 APPENDIX A SUPPORTED FORTRAN SYNTAX A 15 F2c Fortran 77 extensions The tab is supported but does not imply the analysis of characters beyond column 72 By default f2c Fortran supports C string backslash editing This can be disabled using the compiler option bs FORCHECK supports backslash editing if extension 42 has been enabled in the configuration file which is the default for the f2c Fortran 77 compiler emulation A 16 GNU Fortran 77 extensions The GNU Fortran 77 compiler has many options to enable or disable certain language exten sions The configuration file supplied should therefore be considered as a skeleton You can easily adapt this configuration file to your needs when using certain optional extensions when migrating to Fortran 90 The compiler is now succeeded by gfortran cpp preprocessing is supported with limitations The tab is supported but does not imply the analysis of characters beyond column 72 The length of symbolic names is unlimited in GNU Fortran 77 Forcheck considers only the first 64 c
245. tion a structure com ponent or a substring Note that in Fortran 77 a variable was always scalar and named vector subscript A section subscript that is an integer expression of rank one whole array A named array or an array component of a structure with no subscript list 198 APPENDIX F GLOSSARY Index name max number 120 abort 39 Absoft Fortran 77 76 extensions 103 Absoft Fortran 95 77 AC option 18 31 53 54 access type external file 62 69 actual argument 66 operation code 60 aggregate field information 119 all columns option 18 31 53 54 analyse reference structure option 21 33 34 63 67 analysis complete program 66 program unit 56 project 27 selective 28 AP option 34 66 Apollo Domain Fortran 76 extensions 103 AQI option 31 AR option 21 33 34 63 67 argument 66 dummy function 55 max nesting 120 operation code 60 argument list dummy function 55 length of key list 120 max number of objects 120 problem 46 verification 55 66 array actual argument 55 cross reference 59 dimension 59 equivalenced 60 in common 62 66 information 119 length 62 69 operation code 59 rank 59 type 58 undefined 60 119 unreferenced 60 array element actual argument 55 equivalenced 60 information 119 assigned operation code 60 BA option 45 BA option 36 42 batch option 36 BLOCK DATA type code 57 68 build file 51 BYTE 78
246. to find all items that will be affected when you change global items such as an argument list or a common block Education In contrary to most compilers FORCHECK shows the deviations to the Fortran standard very precisely Moreover FORCHECK shows where implicit type conversions and truncations occur Invalid references to procedures and inconsistent common blocks are common errors which are signalled by FORCHECK Conversion FORCHECK verifies at wish if a program is standard conforming In that case you will have minimal problems when transferring a program to another computer system Moreover FORCHECK can emulate most Fortran extensions of many compilers so 1 4 THIS MANUAL 11 you can verify the portability of your program during development without moving the source code to the target system 1 4 This manual This reference manual does not have the intention to describe the Fortran language or the Fortran standard A good working knowledge of the Fortran language and nomenclature is assumed This manual starts with a tutorial to get acquainted with FORCHECK Then it discusses the installation and operational procedures Thereupon a concise description of the program unit analysis reference structure module dependency tree and global program analysis follows In the appendices you can find information on the supported Fortran syntax how you can tune FORCHECK to accept the compiler extensions of your choice and the limitations of FOR
247. ucture component expected expression in CASE statement not in range of selector array unreferenced e An array has been defined but is not referenced array not used e An array has been declared and possibly allocated initialized or assigned but is never used 180 APPENDIX D MESSAGE SUMMARY Appendix E References 10 11 12 13 American National Standard Programming Language FORTRAN American National Stan dards Institute Inc X3 9 1978 New York New York 1978 International Standard ISO IEC 1539 Second edition 1991 07 01 Reference number ISO IEC 1539 1991 E International Standards Organization Geneva 1991 American National Standard Language Fortran 90 American National Standards Institute Inc X 3 198 1992 New York 1992 International Standard ISO IEC 1539 1 Reference number ISO IEC 1539 1 1997 E In ternational Standards Organization Geneva 1997 International Standard ISO IEC 1539 1 Reference number ISO IEC 1539 1 2004 E In ternational Standards Organization Geneva 2004 International Standard ISO IEC 1539 1 Reference number ISO IEC 1539 1 2010 E In ternational Standards Organization Geneva 2010 E W Kruyt FORCHECK A Fortran 77 Programming Aid Proceedings of the Digital Equip ment Users Society pp 199 204 Hamburg 1986 PDP 11 FORTRAN Language Reference Manual Digital Equipment Corporation AA 1855D TC Maynard Massachu
248. udetiles osorno A a a EF 23 3 9 6 Multi platform development ooo 23 4 Operation 25 21 Using the IDE oreesa e a a A ae oP e 25 411 The project VIEW espa ma a a a AR a 25 4 1 2 Creating and Opening a project s a sosa 26 4 1 3 Adding files to the project 2 4 4 0 2 ea ha ee ak we wd 26 4 1 4 Adding all files in a directory to the project 00 oo 26 41 5 Removing files from the project s scs rd soe wa ae a 27 4 1 6 Setting default and project options 0 00 eee eee 27 4 1 7 Setting file options lt lt lt so saesnec ed a a A aw 27 Al DAVING a prgjeCi gasa a bw U a ae ee ee E a ee Bes 27 4 1 9 Starting the FORCHECK IDE from the Windows Explorer 27 4 110 Project ANALYSIS aiii aa we eae OE aa da Y 27 4 1 11 Selective analysis oca a dw ee eRe ee a da a a ee ERs 28 4 1 12 View Edit Print ecc a ies Mog eb nee Sn ee ek hg as ee 28 BEM A AG o habs Boe ia T AA ep ate E eats eae ae 28 4 2 Using FORCHECK in command mode ooo 29 4 2 1 Using Forcheck in interactive mode ooo 29 4 2 2 Command line Entry cocoa ra a a 29 2203 Response lle CAY sii a ee Ba ee a ee es 30 4 3 OPUS 0s aha a a a weal a Ha eae Ae eae ede E 30 4 3 1 Program unit analysis options ee es 31 4 3 2 Global analysis options s sessa s sna es 33 Lo ISU OPUDAS mess ow alee hd ae eee ew ee ee ae ae Sk 34 434 Library Opuons cuicos bd lew a eo ee a ee ee 36 4 3 5 Miscellaneous
249. ult The nondefault type kind and length of the result The rank of an array valued result The number of dummy arguments The line or statement numbers of all occurrences of the name of the entry The line or statement number at which the entry is defined is flagged with a Program unit and procedure types B BLOCK DATA program unit F function M module P main program S subroutine Subcodes M module N interface R recursive T internal Intrinsic types of function entries named constants variables and referenced functions C complex CH character R real I integer L logical N numeric integer real or complex typeless 57 58 CHAPTER 5 ANALYSIS Labels The cross reference table of labels displays all labels the label type and the line or statement number of all occurrences The line or statement number at which the label is defined is flagged with a Label types F format L DO loop For labels other than DO loop or FORMAT statements the label type field is left blank Derived types The cross reference table of derived types displays the following information the name of the derived type the type length the number of bytes a scalar instance of this type will occupy the line or statement numbers of all occurrences of the name of the derived type The line or statement number at which the type is defined is flagged with a Unreferenced derived types which are not specifie
250. ument is a function subroutine external name or label but in the specification of the procedure the argument is of a different class argument type inconsistent with first occurrence e The type of an actual argument differs from that at the first reference encountered type inconsistent with first occurrence e The type of an actual argument of the dummy procedure differs from that at the first reference encountered e The type of a common block object differs from that in the first list encountered argument type inconsistent with specification e The type of an actual argument differs from that in the specification of the proce dure argument type inconsistent with first occurrence int log e The type of an actual argument differs from that at the first reference encountered Mixing of integer and logical types of equal lengths 575 576 577 578 579 580 582 E 583 E 584 161 argument type inconsistent with first occurrence int log e The type of an actual argument of the dummy procedure differs from that at the first reference encountered Mixing of integer and logical types of equal lengths argument type inconsistent with specification int log e The type of an actual argument differs from that in the specification of the proce dure Mixing of integer and logical types of equal lengths argument type inconsistent with first occurrence int real e The type of an actual argument differs fr
251. urce lines SS options are in effect To make clear which part of fixed source records is being ignored the source record past column 72 of non comment records is printed at column 83 and higher Comment records however are printed as they are If the analyze all columns AC or the free source form FF option is enabled all records are printed as they are Source input lines or statements are numbered as described in the section Line or state ment numbering of the chapter Operation If the list included lines SH option is specified input records which are read from an include file are presented with hierarchical line numbers The pages on the listing file are numbered When you use FORCHECK s library facility a hierarchical page numbering system is provided In that case FORCHECK maintains a library version number which is updated each time you insert or replace program units in the library The page numbers printed on the listing present the library version number and the page sequence number as version page 5 1 3 Syntax analysis FORCHECK verifies the syntax of each program unit If the Fortran standard conformance ST option is in effect the the syntax will be verified for conformance to the Fortran standard of the level that is currently in effect If the Fortran 77 conformance F77 Fortran 90 conformance F90 Fortran 95 conformance F95 Fortran 2003 conformance F03 or Fortran 2008 conformance F08 option is
252. version PW 100 reference structure file RSF file Specify the name of a file in which the reference structure will be stored in XML format If no filename is specified the filename is fckrs xml See also the section Reference structure of the chapter Analysis This is a command line option only Default NORSF module dependencies file MDF file Specify the name of a file in which the module dependencies will be stored in XML format If no filename is specified the filename is fckmd xml See also the section Module dependencies of the chapter Analysis This is a command line option only Default NOMDF show program unit SB Generate listings and cross reference tables of individual program units The display of source lines can be suppressed by disabling the list source lines SS option See the section Program unit cross references of the chapter Analysis Default SB list source lines SS List source code To list source code the show program unit SB option must be in effect also See the section Program unit cross references of the chapter Analysis Default SS list included lines SH List lines included from include files The Program units cross reference and the List source 4 3 OPTIONS 35 line options must also be in effect to list included lines Default SH list unreferenced items SI Include unreferenced constants namelist groups and procedures declared in include files or modul
253. which are not in the Fortran 2003 standard are reported In the next paragraphs we describe the way specifiers can be specified in the configuration file Each OPEN CLOSE or INQUIRE keyword or combination of keyword and value must be specified on a single record of the configuration file The list is delimited by a record with a zero Each record has the following format 1 Keyword string A 30 CHANGING THE CONFIGURATION FILE 117 If a keyword starts with the characters of another keyword the longest keyword has to be specified first or the a blank before the to allow non significant blanks between the keyword and the If a keyword may be split up in more than one part separated by blanks Fortran 90 free form input include a blank in the specification at these positions must be included in the name of the shortest keyword Specify 2 OPEN CLOSE INQUIRE indicator character 70 can be used in OPEN statement C can be used in CLOSE statement T can be used in INQUIRE statement Specify additional records with the same keyword for each statement type in which the keyword can be specified 3 Value or value type string This field can either denote a value keyword character constant or the type of a variable value If a value can be a value keyword specify a value keyword in the value type field Each keyword and value combination must be specified in a separate record A value keyword cannot be
254. ysis 4 1 12 View Edit Print To view a file select it and choose File View click on the View Toolbar icon or right click on the selected filename and select View To edit a file select it and choose File Edit click on the Edit Toolbar icon or right click on the selected filename and select Edit You can also view or edit a file by double clicking on it When you double click on a source file the editor is invoked For a library file the librarian starts up For an XML file the reference structure browser is started For other file types the file viewer is invoked You can print a file by selecting the file and choosing File Print from the Menu bar or right click on the selected filename and select Print When generating a listing file FORCHECK uses the page settings of the default printer If you like to use another printer or other page settings than the default set up the printer before starting the analysis by choosing File Page Setup 4 1 13 Make To compile the changed files and link your application you can start a batch or make file from the IDE First choose Options Preferences to set the build utility e g make or cmake If you leave the build utility field empty build assumes a batch file Her you also can specify the default settings for generating a make file Now you select Project Configure and generate makefile and fill out the data needed to generate the make file The FORCHECK analyser determines the dependencies Then

Download Pdf Manuals

image

Related Search

Related Contents

Samsung SMART CAMERA NX20 Manual de utilizare  Datenmanagementsystem zur Sicherstellung der Erfassung, Ver  Samsung SPF-105P User Manual  Baumatic B724SS-A  Kanex Lightning Car Charger  

Copyright © All rights reserved.
Failed to retrieve file