buggy code or buggy compiler?
From: Mike Zulauf (mazulauf_at_met.utah.edu)
Date: 02/25/04
- Next message: Larry Young: "Re: Copy-in/Copy-out"
- Previous message: Steve Lionel: "Re: Automatic variables"
- Next in thread: Steven G. Kargl: "Re: buggy code or buggy compiler?"
- Reply: Steven G. Kargl: "Re: buggy code or buggy compiler?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 Feb 2004 13:18:41 -0800
Hi all. . .
I've got a strange problem - one that I don't know if anyone here will
really be able to help me too much with. But maybe somebody can give me
some advice so I can figure it out.
I have a fairly complex f77 fluid dynamics code. I'm doing most of my
development under Mac OS X, and I compile with g77, NAG, and xlf
compilers. After some recent changes, I've been getting some weird
errors with the NAG compiler.
I don't want to post the code here, since it's rather large, and I
haven't been able to reproduce the behavior with simpler/smaller codes.
What is happening is that I am calculating and filling members of a
vector (call it a). When I do this, the first two values of a different
vector become zeros (call it b). This takes place in a subroutine. In
the main program these two arrays are declared consecutively (first a,
then b). By the way, the new values of a are _not_ zero, so it's not as
simple as the new values of a being written to b.
I would suspect that I have an indexing error somewhere, but this
doesn't happen with g77 or xlf. In addition, if I turn on array bounds
checking with NAG, not only do I not get an error, but I also don't get
the problematic results.
Even weirder, if I insert a line printing out the value of a before it
is calculated, then the correct values of b are not zeroed out.
Any thoughts on this? I've got ddd running on my system, but I'm not
very proficient with it yet.
Thanks,
Mike
-- Mike Zulauf mazulauf@met.utah.edu
- Next message: Larry Young: "Re: Copy-in/Copy-out"
- Previous message: Steve Lionel: "Re: Automatic variables"
- Next in thread: Steven G. Kargl: "Re: buggy code or buggy compiler?"
- Reply: Steven G. Kargl: "Re: buggy code or buggy compiler?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|