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: Relaxing argument requiremens on SYSTEM_CLOCK


Hi,

in addition to the fixes suggested by Steve, please also update the
documentation. Otherwise it looks Ok. Thanks for the patch!

On Sat, Jun 7, 2014 at 1:45 AM, FX <fxcoudert@gmail.com> wrote:
> Forgot the patch, here it isâ
>
> --------------
>
>> Since Fortran 2003, SYSTEM_CLOCK accepts all kinds (and kind combinations) of integer arguments, as well as real COUNT_RATE arguments. To handle this, and avoid explosion of number of nearly-identical library routines, type conversions need to be handled in the front-end. Iâve followed the approach of keeping the two existing library versions, and picking the best depending on the kinds of arguments passed.
>>
>> The patch attached tries to do so. Itâs my first time writing intrinsic subroutine translation code (in trans-intrinsic.c), and itâs less clean than intrinsic function translationâ so I would really welcome a detailed review of the patch, because I might have messed things slightly, or included unnecessary code. For example, is it really needed to have pairs of gfc_init_se/gfc_conv_expr calls for each of the arguments, for this non-elemental routine? Iâm not sure at all.
>>
>> Anyway, the patch bootstraps and regtests on x86_64-apple-darwin13, and passes a few tests Iâve written. Once I have the approach and code reviewed, Iâll make a formal submission with full testcases and documentation.
>>
>> Thanks in advance.
>> FX
>>
>>
>> PS: by my reading of the standard, itâs not exactly clear that what we currently do, and continue to do with my patch (varying the clock rate returned depending on argument types), is actually allowed
>



-- 
Janne Blomqvist


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