This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A bit of advise needed.


 Hi everyone,

  I have looked some more about implementing intrinsic modules, and I think I have sorted out most of the details, I just wanted to outline my plan before getting to far into it.

 Here it is:

 First we have the g77 calls, they can be used to generate calls to C functions, we only have to 'parse' the arguments/return values. I believe that this is the most convenient way to manage the calls. If I am correct the use of g77 calls are 'tagged' int the internal representation, thus I should be able to build a module with g77 calls and link to a module not utilizing this, this suits us fine.

 We have to map C types to FORTRAN kind's, it's fairly straightforward, but I am having some trouble determining the type on different systems, ( during build ). No problems here.

 The C_VAL C_LOC and so on really is intrinsic functions available only in the scope of the module, thus we have to maintain regular module scoping rules for these 'compile time directives', I am looking further into this.

 After looking at what has to be done, I think that it's not possible to use a 'generic' approach to intrinsic modules, ( thus their name I suspect ), but that they have to be coded into the compiler, ( the IEEE FP traps have to have some library code though ).

 So I plan to progress by making a imodule.c in gfortran, which hooks into the parser at the same place that use module does, enabled by a compile time flag. I will however try to reuse as much as possible of the module framework as possible without duplication, since that would handle the scoping rules of the intrinsic modules. Basicly hardcode the intrinsic modules in a separate file for now.

 Does all this sound doable, and somewhat in a sound direction ?

 / regards, Lars Segerlund.


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