https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92712
--- Comment #16 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #15) > I guess we could handle those cases by using something like > check_for_binary_op_overflow, except that for the case where A might be -1 > and plusminus equal to MINUS_EXPR we also need to make sure the result of > B-C is known not to be min. You may not need to worry about the multiplication overflowing. If a*b+a*c and b+c are computed with an undefined overflow type and do not overflow, then a*(b+c) cannot overflow either.