This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-ftime-report might wrap
- From: "Unruh, Erwin" <Erwin dot Unruh at fujitsu-siemens dot com>
- To: GCC mailing list <gcc at gcc dot gnu dot org>
- Date: Wed, 28 Jan 2009 11:19:43 +0100
- Subject: -ftime-report might wrap
Hello,
I stumbled over a problem in timevar.c, function timevar_accumulate. When USE_CLOCK is set on a 32-bit system, the counter silently wraps around. This can result in negative time values, or some time being ignored (because one pass uses more than 72 minutes of time).
A check like
if (stop_time->user < start_time->user)
could detect that problem. (Unless a pass uses 72 minutes in one chunk.)
Erwin