[Bug c/68431] Regression in GCC-6.0.0's optimizer

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 19 10:56:00 GMT 2015


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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
In extract_range_from_binary_expr_1 we have
                  /* When vr0.max < 0, vr1.min != 0 and value
                     ranges for dividend and divisor are available.  */
                  if (vr1.type == VR_RANGE
                      && !symbolic_range_p (&vr0)
                      && !symbolic_range_p (&vr1)
                      && !compare_values (vr1.min, zero))
                    max = int_const_binop (code, vr0.max, vr1.min);
                  else
                    max = zero; 

but that looks weird: the comment says "vr1.min != 0" but "&& !compare_values
(vr1.min, zero)" ensures that vr1.min is zero.


More information about the Gcc-bugs mailing list