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]

Re: hooking a new intrinsic subroutine?


On Sunday 18 April 2004 05:58, Steve Kargl wrote:
> Gang,
>
> Are there any simply to follow rules on hooking up a new
> intrinsic subroutine to gfortran?  I have the guts of
> date_and_time() implemented and system_time() will be
> done shortly.  I was going to emulate how random_seed()
> and random_number() are implemented, but unfortunately
> these procedures are broken on FreeBSD.

Last time I looked we didn't handle optional arguments in intrinsic 
subroutines properly. Specifically we don't pass the character length 
parameters for absent optional arguments.

My preferred solution would be to fix this (no particular ideas how, sorry), 
and resolve each of the two intrinsics you mention to a single library call.

The alternative would be to resolve to different library calls based on the 
presence/absence of arguments. This has the potential to get really ugly if 
we start adding extra character based intrinsic subroutines, so I'd prefer 
not to go this route.

Paul


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