https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92283
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #17 from Alexander Monakov <amonakov at gcc dot gnu.org> --- (In reply to Richard Biener from comment #16) > interestingly 66:66 and 67:67 generate exactly the same code and > 66:67 add a single loop. That's totally odd but probably an > artifact of a bug in dbg_cnt_is_enabled which does > > bool > dbg_cnt_is_enabled (enum debug_counter index) > { > unsigned v = count[index]; > return v > limit_low[index] && v <= limit_high[index]; > } > > where it should be v >= limit_low[index]. This is intentionally like that, the idea is that a:b makes a half-open interval with the right bound (b) not included. So 66:66 and 67:67 are both simply empty intervals. dbg_cnt_is_enabled tests left bound with '>' and right bound with '<=' because its caller (dbg_cnt) incremented the counter before the call.