Skip to content
Snippets Groups Projects
Commit 3b4c362e authored by nilfit's avatar nilfit
Browse files

revert to old return value for intrinsic_overflowing

This fixes `tests/symbolic/slice` failing. It might be better to remove
the return value entirely since no one seems to use it.
parent 6fe2f4d9
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,13 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
) -> EvalResult<'tcx, bool> {
let (val, overflowed) = self.binop_with_overflow(op, left, right)?;
self.write_primval(dest, val, dest_ty)?;
if overflowed.is_concrete() {
Ok(overflowed.to_bool()?)
} else {
// keeps the old behavior of ignoring overflow for symbolic ops
// this works because the return value is never used
Ok(false)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment