Procedure pointers
Steve Kargl
sgk@troutmask.apl.washington.edu
Thu Jun 7 21:37:00 GMT 2007
On Thu, Jun 07, 2007 at 11:19:25PM +0200, Janus Weil wrote:
>
> I hope you remember me. I'm the guy who plans to implement procedure
> pointers in gfortran and got this accepted as a Google Summer of Code
> project. While starting to work on this project I discovered that
> procedure pointers are already implemented in g95. Since g95 is also
> open source and actually very closely related to gfortran (as I found
> out), it came to my mind that one could try to port g95's implementation
> of procedure pointers to GCC, instead of re-inventing the wheel
> completely. So my question to all of you would be: Do you think this is
> a good idea or do you see any obstacles (legally or technically) that
> would prevent this?
The last time I looked the author of g95 did not maintain a
ChangeLog. While it is almost certain he wrote the code (and
he had a signed copyright assignment), we cannot verify the
origins of the code. This could be a legal constraint.
> I'm really not a licensing expert and quite new to open source, so I'm
> not sure if it is legal to include code from one open source project
> into another, but my naive guess would be yes.
GCC requires assignment of the copyright to the FSF. If you take
code from another OSS project, you may need to have the authors of
the code agree to copyright assignment.
> If I'm not mistaken g95 is also released under the GPL, right?
Yes.
> On the technical side: I had a look at both the g95 and the gfortran
> source code (mainly the parser), and to me it seems they are pretty
> similar if not identical in large parts. But I don't know if any major
> structural changes occured since the fork that would complicate porting
> code from one to the other.
> Any comments on this are highly appreciated ...
On the technical side, the internal representation of the numeric
types in gfortran is done with MPFR and GMP. g95 uses the BigNum
package. I also suspect that several of the major data structures
have diverged (e.g., g95_expr vs. gfc_expr). With the legal issues
above and these cursory technical difference, it may be best to
design/write the code from scratch. In fact, I believe Paul Thomas
has done some thinking and prototyping of procedure pointers. I don't
have his email address handy, so search the fortran@ archive and send
him a short email about your ideas.
--
Steve
More information about the Fortran
mailing list