https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110316
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Target Milestone|--- |10.5 Known to fail| |4.8.0 Last reconfirmed| |2023-06-20 Component|testsuite |middle-end Summary|[14 regression] |[10/11/12/13/14 Regression] |g++.dg/ext/timevar1.C and |g++.dg/ext/timevar1.C and |timevar2.C fail erratically |timevar2.C fail erratically Keywords| |ice-on-valid-code Status|UNCONFIRMED |NEW Known to work| |4.7.0 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I would not call this a regression from GCC 13 but from much earlier, r0-117422-ga910399dfd44. The check is definitely wrong since wall difference is less than ticks_to_msec here. Most likely the check should be rather: if (phase_user > total->user + toleranceu || phase_sys > total->sys + tolerances || phase_wall > total->wall + tolerancew || phase_ggc_mem > total->ggc_mem * tolerance) Where toleranceu, etc. should be defined as: tolerancew = total->user * (tolerance - 1); toleranceu = total->user * (tolerance - 1); tolerances = total->sys * (tolerance - 1); #ifdef USE_TIMES if (tolerancew < ticks_to_msec) tolerancew = ticks_to_msec; if (toleranceu < ticks_to_msec) toleranceu = ticks_to_msec; if (tolerances < ticks_to_msec) tolerances = ticks_to_msec; #endif #ifdef USE_GETRUSAGE toleranceu = total->user * (tolerance - 1); tolerances = total->sys * (tolerance - 1); #endif #ifdef USE_CLOCK if (toleranceu < clocks_to_msec) toleranceu = clocks_to_msec; #endif The reasoning is the tolerance should be at min a tick.