https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92283

--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Alexander Monakov from comment #17)
> (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.

How useful (not).  We then at least should reject -fdbg-cnt=foo:5:5

Reply via email to