[Bug middle-end/86380] incorrect comparison in function chose_multiplier

2018-07-03 Thread colinwb at yahoo dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86380

--- Comment #4 from Colin Bartlett  ---
>(In reply to Eric Botcazou from comment #3)
> > I suspected that when compiled programs didn't show the error, but:
> > 
> > 1. Is that documented anywhere? It might be useful if that was documented
> > also in choose_multiplier?
> > 
> > 2. Is that anyway any reason not to use the correct comparison, unless there
> > is a good reason to use the wrong comparison?
> 
> No and no.

In that case I suggest that:

(a) There's no need for any urgency at all for this as it won't affect
anything.

(b) But at an appropriate time in the future one of the following is done:

(b1) The comparison is changed to the correct comparison, maybe with a comment
that in previous versions ">=" was used which went wrong in the circumstances
set out above but choose_multiplier was never called with those arguments.

(b2) The comparison is left unchanged, but a comment is added that strictly
speaking we should use ">" but as choose_multiplier should never be called with
arguments for which ">" has a different effect to ">=" we can just use ">=".

My (strong) preference is for (b1).

[Bug middle-end/86380] incorrect comparison in function chose_multiplier

2018-07-03 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86380

--- Comment #3 from Eric Botcazou  ---
> I suspected that when compiled programs didn't show the error, but:
> 
> 1. Is that documented anywhere? It might be useful if that was documented
> also in choose_multiplier?
> 
> 2. Is that anyway any reason not to use the correct comparison, unless there
> is a good reason to use the wrong comparison?

No and no.

[Bug middle-end/86380] incorrect comparison in function chose_multiplier

2018-07-03 Thread colinwb at yahoo dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86380

--- Comment #2 from Colin Bartlett  ---
I suspected that when compiled programs didn't show the error, but:

1. Is that documented anywhere? It might be useful if that was documented also
in choose_multiplier?

2. Is that anyway any reason not to use the correct comparison, unless there is
a good reason to use the wrong comparison?