https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68963
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Wed Apr 6 07:57:47 2016 New Revision: 234774 URL: https://gcc.gnu.org/viewcvs?rev=234774&root=gcc&view=rev Log: 2016-04-06 Richard Biener <rguent...@suse.de> Backport from mainline 2016-02-24 Richard Biener <rguent...@suse.de> PR middle-end/68963 * tree-ssa-loop-niter.c (derive_constant_upper_bound_ops): Fix bogus check. (record_nonwrapping_iv): Do not fall back to the low/high bound for non-constant IV bases if the stmt is not always executed. * gcc.dg/torture/pr68963.c: New testcase. Added: branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr68963.c Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/testsuite/ChangeLog branches/gcc-5-branch/gcc/tree-ssa-loop-niter.c