This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

FW: libf2c compatibility???


Sir,

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++.

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

	What determines the initial position of the memory pointer for the
	address buried in (cilist *)a [that is, ((Namelist
*)a->cifmt)->vars[0]->addr]
	just before it gets passed to the function x_rsne(cilist *a)? And
where is memory allocated
	for the data that gets written starting at this address?

Are the address location and memory size determined by the g77 compiler?

Thanks
----------
From: 	rlau@csc.com[SMTP:rlau@csc.com]
Sent: 	Thursday, June 15, 2000 3:09 PM
To: 	david.r.mehl@lmco.com
Subject: 	Re: libf2c compatibility???




---------------------- Forwarded by Raymond K Lau/TMG/CSC on 06/15/2000
03:15 PM
---------------------------


toon@moene.indiv.nluug.nl on 06/15/2000 02:22:36 PM

To:   Raymond K Lau/TMG/CSC@CSC
cc:   gcc@gcc.gnu.org
Subject:  Re: libf2c compatibility???



rlau@csc.com wrote:

> Does anyone in this mailing list know how certain data structure are
initiliazed
> in a g77 generated object?
>   I am talking about data structure that is associated with namelist.
Those
> data structure are basically
>   defined in libf2c?

Yep.  Actually, I helped Craig Burley, original author of g77, to draw
up the interface between g77 and libf2c w.r.t. namelists.  This is so
long ago that Craig had to remind me some years ago (it probably
happened in early '93).

It might be easier for me to answer your questions if you describe the
problem you're trying to solve ...

Cheers,

--
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)




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]