Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-03 Thread Janus Weil
Unless somebody else has objections, together with a documentation patch and a ChangeLog entry, this is Ok for trunk. thanks, Janne. Here is an updated patch with docu and ChangeLog. I will wait another day before committing, in order to allow for further comments. Committed as r194105.

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Janus Weil
Hi all, since the first version of my SYSTEM_CLOCK patch was not so well received, I propose here an alternative patch: It does not use a fixed COUNT_RATE, but adjusts it to match the resolution of the underlying library function which is used. For the int4 version it additionally limits

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Tobias Burnus
Janne Blomqvist wrote: Needing to link with librt in order to access clock_gettime is an unfortunate wart in glibc, but other C libraries exist out there (heck, given the success of Android, glibc is certainly a minority even if you limit yourself to Linux), and of those that provide

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Janus Weil
Needing to link with librt in order to access clock_gettime is an unfortunate wart in glibc, but other C libraries exist out there (heck, given the success of Android, glibc is certainly a minority even if you limit yourself to Linux), and of those that provide clock_gettime, most have it

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Janne Blomqvist
On Sun, Dec 2, 2012 at 3:19 PM, Janus Weil ja...@gcc.gnu.org wrote: Hi all, since the first version of my SYSTEM_CLOCK patch was not so well received, I propose here an alternative patch: It does not use a fixed COUNT_RATE, but adjusts it to match the resolution of the underlying library

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Janne Blomqvist
On Sun, Dec 2, 2012 at 4:46 PM, Tobias Burnus bur...@net-b.de wrote: Janne Blomqvist wrote: Needing to link with librt in order to access clock_gettime is an unfortunate wart in glibc, but other C libraries exist out there (heck, given the success of Android, glibc is certainly a minority

[Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-01 Thread Janus Weil
Hi all, here is a straightforward patch for the intrinsic procedure SYSTEM_CLOCK. It does two things: 1) It reduces the resolution of the int8 version from 1 nanosecond to 1 microsecond (COUNT_RATE = 100). 2) It adds an int16 version with nanosecond precision. The motivation for item #1 was

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-01 Thread Janne Blomqvist
On Sat, Dec 1, 2012 at 1:17 PM, Janus Weil ja...@gcc.gnu.org wrote: Hi all, here is a straightforward patch for the intrinsic procedure SYSTEM_CLOCK. It does two things: 1) It reduces the resolution of the int8 version from 1 nanosecond to 1 microsecond (COUNT_RATE = 100). 2) It adds an

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-01 Thread Janus Weil
Hi Janne, thanks for your feedback ... here is a straightforward patch for the intrinsic procedure SYSTEM_CLOCK. It does two things: 1) It reduces the resolution of the int8 version from 1 nanosecond to 1 microsecond (COUNT_RATE = 100). 2) It adds an int16 version with nanosecond