On Sat, Aug 15, 2020 at 06:57:03PM +0900, Stafford Horne wrote: > On Thu, Aug 06, 2020 at 09:30:03PM +0200, Luc Van Oostenryck wrote: > > --- a/linearize.c > > +++ b/linearize.c > > @@ -2468,6 +2468,49 @@ static pseudo_t linearize_statement(struct entrypoint *ep, struct statement *stm > > return VOID; > > } > > > > +static void check_tainted_insn(struct instruction *insn) > > +{ > > + unsigned long long uval; > > + long long sval; > > + pseudo_t src2; > > + > > + switch (insn->opcode) { > > + case OP_DIVU: case OP_DIVS: > > + case OP_MODU: case OP_MODS: > > + if (insn->src2 == value_pseudo(0)) > > + warning(insn->pos, "divide by zero"); > > + break; > > Is this divide by zero a new check? I get the shift, but is this new? Yes, and no. The warning is already given (using 'division by zero') but, like for shifts before this series, issued early, before dead code elimination is done. So, code like the following: ... if (d != 0) r = a / d; ... issues the warning nevertheless. So, the check here above is now unused but is a preparation for the part 2 doing the same for division by zero by zero. Best regards, -- Luc