This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34533] DTIME returns total process time and not since last invocation
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Dec 2007 18:26:24 -0000
- Subject: [Bug fortran/34533] DTIME returns total process time and not since last invocation
- References: <bug-34533-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from kargl at gcc dot gnu dot org 2007-12-20 18:26 -------
(In reply to comment #3)
> Another question: contrary to g77, we now have support for OpenMP. How about
> concurrency issues? Shall DTIME give the time since the last invokation from
> any thread, i.e. maintain a global storage, or the last invokation from the
> same thread, i.e. thread local storage?
>
I think gfortran will need to handle it similar to how random_seed is done.
See libgfortran/intrinsics/random.c. In fact, one could potentially import
the code from random.c into dtime with only a minimum effort (famaous last
words).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34533