This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Relaxing argument requiremens on SYSTEM_CLOCK
- From: FX <fxcoudert at gmail dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: gfortran <fortran at gcc dot gnu dot org>, Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Date: Sat, 7 Jun 2014 16:36:47 +0200
- Subject: Re: Relaxing argument requiremens on SYSTEM_CLOCK
- Authentication-results: sourceware.org; auth=none
- References: <8B5AB16A-FA89-4AFD-BB04-8B1B0D6B9991 at gmail dot com> <20140607142427 dot GA27096 at troutmask dot apl dot washington dot edu>
> Note, there is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61429
> which I grabbed before you posted your patch. I like your
> approach/patch much better than the patch I had hacked up.
Indeed, I had seen it at some point but then forgotten about it.
> shouldn't the 2nd gfc_int4_type_node be gfc_int8_type_node?
Yes, it’s a copy-pasto.
> Also, is this line a leftoever from debugging (and can be removed)?
> +extern void debug_tree (tree);
Right on both counts.
> CLOCK_RATE is an intent(out) entity.
> The standard says that "it is is assigned a processor-dependent
> approximation to the number of processor clock counts per second, or
> zero if there is no clock." Given modern hardware where cpu throttling
> is common, it would seem to me that the clock rate can varying.
I agree that CLOCK_RATE can vary in principle, *if something happens to the processor clock*.
Right now, in gfortran, suppose you call SYSTEM_CLOCK twice, once with a 32-bit integer, once with a 64-bit integer. The two values of clock rate will differ by 3 orders of magnitude, but there is supposed to be one clock (that’s how the standard reads), which has not varied in the meantime.
FX