https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97812
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:041451586908fc1d76f45f5043c88f7b0ccb401b commit r10-9103-g041451586908fc1d76f45f5043c88f7b0ccb401b Author: Richard Biener <rguent...@suse.de> Date: Fri Nov 13 11:31:22 2020 +0100 tree-optimization/97812 - fix range query in VRP assert discovery This makes sure to properly extend the input range before seeing whether it fits the target. 2020-11-13 Richard Biener <rguent...@suse.de> PR tree-optimization/97812 * tree-vrp.c (register_edge_assert_for_2): Extend the range according to its sign before seeing whether it fits. * gcc.dg/torture/pr97812.c: New testcase. (cherry picked from commit dcfd302a79a5e2ea3bb16fc4fc45a5ee31cc0eab)