Re: changing argument types for four functions



Lynn McGuire wrote:
| I am changing the arguments for four functions in my code from:
|
| subroutine dfbk (integer, integer, integer)
| subroutine lcbk (integer, integer, integer)
| subroutine mdbk (integer, integer, integer)
| subroutine dlbk (integer)
|
| To:
|
| subroutine dfbk (character*8, integer, integer)
| subroutine lcbk (character*8, integer, integer)
| subroutine mdbk (character*8, integer, integer)
| subroutine dlbk (character*8)
|
| What is the best way in my 550,000 lines of code to detect that
| I failed to change one of the 4,100 calls to these subroutines
| from integer to character*8 ?
|
| Please note that my primary compiler is still the Open Watcom
| F77 compiler but I am also porting to Intel Visual Fortran compiler.

In IVF, go to "Project Properties/Fortran/External procedures".
Change the "Calling convention" to "CVF" & rebuild all.
You will get linker errors for all files (alas, not individual
calls) which call *bk with integer arguments.

Note: That will work only in character/anything mismatches
because of the hidden length argument. In CVF (stdcall) convention
the name decoration (routine signature) contains number of
bytes pushed on stack and the mismatch.

2nd method is to create a source file containing

INCLUDE "mainprogram.for"
....
INCLUDE "<everything>"

and build *only* that file (if the compiler can swallow what is
in effect one source file of 550,000 lines). That will likely
catch ALL mismatches. If you put a MODULE x/END MODULE x around
it AND all routines are properly terminated with END SUBROUTINE,
you will get even more problem diagnostics.

HTH,
--
Jugoslav
___________
www.xeffort.com

Please reply to the newsgroup.
You can find my real e-mail on my home page above.
.



Relevant Pages

  • Re: changing argument types for four functions
    ... >> in effect one source file of 550,000 lines). ... If you put a MODULE x/END MODULE x around ... >> it AND all routines are properly terminated with END SUBROUTINE, ... If you wanna blow up the compiler with monster code, ...
    (comp.lang.fortran)
  • Re: changing argument types for four functions
    ... That will work only in character/anything mismatches ... > in effect one source file of 550,000 lines). ... If you put a MODULE x/END MODULE x around ... > it AND all routines are properly terminated with END SUBROUTINE, ...
    (comp.lang.fortran)
  • Re: How to set my own program startup in f77 programs other than MAIN__
    ... But we don't have the source file where ... whatever they call it these days) compiler. ... I think the whole approach of stuffing your initializer into a ... "Operation of the Runtime Linker ...
    (comp.lang.fortran)
  • Re: runtime identification of compiler through executable
    ... i need to use this information in a source file ... ... You could try the "strings" command, ... the compiler at the top, ... and its original path. ...
    (comp.unix.aix)
  • Re: Getting source file from the object file
    ... is the output of a particular compiler whose output is a deterministic ... some source file which when compiled by that compiler ... machine code, and include the machine code as a static array. ...
    (comp.lang.c)