FW: libf2c compatibility???

Toon Moene toon@moene.indiv.nluug.nl
Fri Jun 16 12:51:00 GMT 2000


Mehl, David R wrote:

> We have a problem where namelist data is overwriting (corrupting)
> memory. We are using g77 to compile FORTRAN files on a Windows
> NT platform, and are linking to the libf2c library. We are running a code
> mix of C++/FORTRAN and compiling/linking using Microsoft Visual C++
> version 6.0 (I know, I know. We're ashamed). Note that we are also
> compiling libf2c using Visual C++.

Well, obviously, I do not have opinions on products I do not use myself
:-)

[ However, it's amazing that you managed to compile libf2c with C++ -
  it certainly wasn't written for such an exercise :-) ]

> Anyway, it looks like the hash table is being generated correctly but the
> namelist data is being written to a questionable memory location.

Before I try to answer your original question, you could try to find out
if the overwrite problem is a problem in your own code (OK, that's not
what you wanted to hear ...).

Could you try to compile your code with the extra option -fcheck-bounds
to see whether somewhere your program violates array bounds ?  TIA.

[ Note that you need gcc-2.95.x for this to work ]

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


More information about the Gcc mailing list