This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [gfortran] PATCH implement g77 intrinsics


François-Xavier Coudert wrote:
> Please find attached a patch (g77_intrinsics.diff and all .c files)
> implementing some g77 intrinsics into gfortran (the exact list is: chdir,
> gerror, getlog, hostnm, ierrno, kill, link, perror, rename, sleep,
> symlnk, time, time8).

Very cool!

> All this is bootstrapped and regtested on i686-linux, for both mainline
> and 4.0. As this patch is rather self-contained and doesn't interfere
> with the rest of the compiler, I hope to get a quick approval.

Steve promised to review this, so I'll only make a few general comments:

> 	* gcc/fortran/check.c, gcc/fortran/gfortran.h,
> 	  gcc/fortran/intrinsic.c, gcc/fortran/intrinsic.h,
> 	  gcc/fortran/iresolve.c, gcc/fortran/trans-intrinsic.c:
> 	  add support for resolving and checking arguments for the
> 	  new intrinsics.

Different files go on different lines in the ChangeLog, and yes, you have to
list all functions.

> 	* chdir.c, gerror.c, getlog.c, hostnm.c, ierrno.c, kill.c,
> 	  link.c, perror.c, rename.c, sleep.c, symlnk.c, time.c:
> 	  implement intrinsics themselves.

Same.

- I'm wondering if it wouldn't be better to use the same check functions for
functions which take the same set of arguments.

- Instead of implementing different intrinsics for different integer kinds,
you could insert a type conversion during resolution, see e.g.
gfc_resolve_besn.  I don't think anybody will complain about not being able to
call sleep with an argument > 2**32 :-)

> 2005-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
> 
> 	* g77_intrinsics_funcs.f: New test.
> 	* g77_intrinsics_sub.f: New test.

I doubt these tests are portable, so maybe we shouldn't run these tests on
some platforms (Windows, e.g.)

I recall Steve saying that he was writing documentation for some of the
intrinsics he has implemented.  Can you add documentation for the intrinsics
you implemented (possibly taking it from g77), once there's a place to put it?

- Tobi


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