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


> 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


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