This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/34533] New: DTIME returns total process time and not since last invocation


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


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