This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: MPICH, IARGC, and GETARG
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Scott Robert Ladd <coyote at coyotegulch dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Mon, 25 Oct 2004 17:16:41 +0200
- Subject: Re: MPICH, IARGC, and GETARG
- References: <417D0A2E.3050907@coyotegulch.com>
Scott Robert Ladd wrote:
> external getarg
I'm not completely sure, but this line looks like the problem: this will make
gfortran generate a call to getarg_ instead of getarg_i4. (Naming which is due
to the fact that getarg can be called with an integer*4 argument or with an
integer*8 argument, in which case getarg_i8 would be the right function) I
cured a similar problem with the etime intrinsic by adding a etime_ function
thunk to the library, but maybe we should aim for a general solution in the
compiler instead of adding these on a case by case basis, as these issues seem
to be more common. Maybe name rename getarg_i4 to getarg_, but also keep
getargt_i8, and similarly for the other intrinsics which expect scalar
arguments. (For array arguments we use different calling conventions for
intrinsics and external functions so this won't work, we'd alway need thunk
functions which would setup the array descriptor.)
- Tobi