COMPLEX functions and g77 compatibility (was: Re: Can gfortran compile fftw3?)
Steven G. Johnson
stevenj@alum.mit.edu
Wed Feb 23 19:03:00 GMT 2005
Tobias Schlüter wrote:
> I thought passing / returning COMPLEX is handled differently, but I was sure
> someone would report a bug if this was truly the case, so maybe it works the
> same after all. Or maybe it's just not important.
Hi Tobias,
I just checked this. First, argument passing of COMPLEX is apparently
the same, and calling FFTW's transform routines from gfortran produces
the correct results (aside from an I/O glitch, described in another
message).
However, *returning* COMPLEX from a *function* is apparently different.
This doesn't affect FFTW (it only presents a subroutine interface to
Fortran, since cross-language function returns are problematic), but I
think it is a relatively important problem.
For example, this means that you cannot have a single optimized BLAS
library on your machine that is usable from both g77 and gfortran
(thanks to functions like zdotc).
I've filed a bug report with a test case: bug #20178
More information about the Fortran
mailing list