This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34533] New: DTIME returns total process time and not since last invocation
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Dec 2007 22:44:32 -0000
- Subject: [Bug fortran/34533] New: DTIME returns total process time and not since last invocation
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Found by Dominique.
For the first call, DTIME and ETIME (should) behave identical: The elapsed time
since invocation should be returned. (This works.)
ETIME does this also for the following calls, but DTIME shall do the following:
"Subsequent invocations of DTIME return values accumulated since the previous
invocation."
However, gfortran currently calls _gfortran_etime_sub for both, which in turn
calls getrusage. Thus ETIME is ok, but for DTIME the wrong result is returned.
Documentation:
http://gcc.gnu.org/onlinedocs/gfortran/DTIME.html
http://gcc.gnu.org/onlinedocs/gfortran/ETIME.html
--
Summary: DTIME returns total process time and not since last
invocation
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34533