[Patch, Fortran] PR32980 - Add GAMMA and LGAMMA intrinsics

Tobias Schlüter Tobias.Schlueter@physik.uni-muenchen.de
Wed Aug 22 20:13:00 GMT 2007


Steve Kargl wrote:
> On Tue, Aug 21, 2007 at 10:32:05PM +0200, Tobias Schl?ter wrote:
>> Ok, since you and Steve agree on this, I have a suggestion that I think 
>> we all could live with: if the user defines a function that has the same 
>> name as an intrinsic available with the selected standard, issue a 
>> warning, perhaps only with -Wall.  Bonus points for a command line 
>> option that allows disabling intrinsics by name.
>>
> 
> Harald and I had a long bugzilla exchange about INTRINSIC/EXTERNAL
> and etime (or iargc?).  This is a similar problem.  Ah, here it is
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20248

This was interesting, showing the different pitfalls one may run into.

> I'd have to go review the name mangling code.  AFAIK, gfortran assumes
> any procedure that is not specifically listed in an INTRINSIC/EXTERNAL
> statement is an intrinsic procedure, so the name is mangled and 
> _gfortran_XXXX_ is looked up.  If it exists, gfortran keeps going.  If
> it does not exist, then gfortran will mangle the name to XXXX_ and 
> assume the user will supply the XXXX_ routine.  It seems that you
> are proposing the opposite.

I don't think this is at all related to what I'm suggesting.  This is 
interesting information nonetheless, as I never quite made my way 
through the intrinsic resolution code.

> BTW, there is -Wnonstd-intrinsics.

This option addresses yet another way of being surprised by non-standard 
intrinsic.  In the case of -std=gnu it will not be at all helpful, of 
course.

Thanks,
- Tobi



More information about the Fortran mailing list