Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Sep 2006 23:39:58 +0000 (UTC)
Jim Klein <jameseklein@xxxxxxxxxxxxx> wrote:
(snip)
It has a named common block that is inside an include file. The(snip)
variable in question is named LDIF2 and is used by the program,
depending on how it is set by the user to control some program
behavior. It is declaired as LOGICAL. It is the only variable in the
common block.
In the IVF compile, when the program runs, the variable changes from
TRUE to FALSE unexpectedly during somewhat related operations but
nothing that should have changed its state. I have placed traps
wherever LDIF2 is explicitly set in the code (write statements). LDIF2
is not being reset at any code location I can find.
COMMON blocks are often located sequentially in memory, and if
you go outside an array on one it is easy to go into variables
in the next or previous block in memory.
Most compilers now have an option to do array bounds checking.
That has a good chance of finding the problem.
Most of the other problems with COMMON should not occur if it
only has one variable in it.
Another way to find problems like this is with a debugger
that can test for changes in a variable. gdb can do that,
I don't know which other ones can.
-- glen
.
- Follow-Ups:
- References:
- Strange Porting Problem CVF to IVF, requesting help and ideas.
- From: Jim Klein
- Strange Porting Problem CVF to IVF, requesting help and ideas.
- Prev by Date: Strange Porting Problem CVF to IVF, requesting help and ideas.
- Next by Date: Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- Previous by thread: Strange Porting Problem CVF to IVF, requesting help and ideas.
- Next by thread: Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- Index(es):
Relevant Pages
|
|