RFC POSIX Fortran Interface
Steve Kargl
sgk@troutmask.apl.washington.edu
Sun Oct 14 21:19:00 GMT 2007
On Sun, Oct 14, 2007 at 01:54:01PM -0700, Walter Spector wrote:
> Steve Kargl wrote:
> > ...
> > I haven't read through the code in detail; however, I'm wondering
> > what your plans are. In particular, do you plan to add the PXF
> > functions as gfortran intrinsic procedures?
>
> There is nothing in PXF that requires the routines to be intrinsic.
> So I would suggest not.
That's good. I haven't spent too much time reading the PXF docs
(other than to note that it shouldn't be hard to implement).
> > ... This would allow someone (perhaps, Walt) to use their
> > own implementation of libpxf without worrying about whether gfortran
> > screws with the namespace.
>
> Don't worry about me. It is trivial to link my library ahead of any
> system supplied libraries.
Name mangling occurs before linking. I suspect that you may actually
use an EXTERNAL statement in your code, so name mangling won't occur.
For example, the current behavior is
program foo
print *, iargc() ! Name mangled to _gfortran_iargc_
end program foo
program bar
external iargc
print *, iargc() ! Name not mangled; becomes iargc_
end program bar
In bar, gfortran is expecting the programmer to supply an iargc
function. In foo, gfortran assumes that iargc is an intrinsic
procedure.
--
Steve
More information about the Fortran
mailing list