Warn on undefined loop exit.
commitf18e93a8e53abb42cdcb344d966808be2505a9dc
authorams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Nov 2014 20:22:54 +0000 (20 20:22 +0000)
committerams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Nov 2014 20:22:54 +0000 (20 20:22 +0000)
tree431f77de5d4b389b2cbcd785e96ac89bb1d9fa29
parent126be8f9f89e17ae9a145993fcc25a01232e24c8
Warn on undefined loop exit.

2014-11-20  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Warn if a loop
condition would be removed due to undefined behaviour.

gcc/testsuite/
* gcc.dg/undefined-loop-1.c: New file.
* gcc.dg/undefined-loop-2.c: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217891 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/undefined-loop-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/undefined-loop-2.c [new file with mode: 0644]
gcc/tree-ssa-loop-niter.c