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]

autoconf, inter-language linking


Dear g95/gfortran folks [which mailing list should I use?],

Since my initial Fortran 9x patches recently got committed to autoconf CVS
and will be in the next autoconf release, I thought I'd take a look and
see what you guys were up to.

I noticed that you wrote on your web page:

	"In order to efficiently implement the passing of array sections,
binary compatibility to Fortran 77 had to be abandoned. If the user wishes
to link his sources with old Fortran 77 codes, the command line option
-fg77-calls changes back to the old calling convention used by G77."

I'm wondering what the technical meaning/consequences of this are,
especially for inter-language linking (ability to mix languages where
convenient is one of my main reasons for using autoconf, and freedom of
language choice is something that I think should be encouraged across the
gcc front-ends).  A new calling convention will mean lots of headaches, as
I'm sure you're aware, e.g. in sharing numerical libraries between
languages & compilers.  (I tried googling and found some old messages from
g95-develop, but they weren't very clear and were maybe out of date.)

Have you looked at the way other modern Fortran compilers work, e.g. IBM
xlf/xlf90/..., SGI f77/f90/..., HP/Compaq/DEC fort, Intel ifc, etcetera?  
I've never noticed any particular problems in interlanguage calls with
those compilers, and have happily passed arrays back and forth between
e.g. f90 and C using the usual Fortran-77 technique (passing pointers via
appropriately mangled subroutine identifiers).

This makes me concerned that you've adopted a new calling convention when
it's not really necessary.  "Premature optimization is the root of all
evil."

(Note that if, e.g. passing discontiguous array sections requires a copy
for all other compilers, users will tend to realize this and avoid it in
performance-sensitive circumstances anyway.  One can also assume that
those vendors were fairly aggressive about performance where it counts.)

Steven

PS. Is 'gfortran' planned to be the eventual name of the executable, or is
it too early to say?  If you know, I should update autoconf's macros to
look for this name.


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