Warn on undefined loop exit.
authorAndrew Stubbs <ams@codesourcery.com>
Thu, 20 Nov 2014 20:22:54 +0000 (20:22 +0000)
committerAndrew Stubbs <ams@gcc.gnu.org>
Thu, 20 Nov 2014 20:22:54 +0000 (20:22 +0000)
commit480677242917f34fa2f72ef5e02e6b43689d0ae5
tree431f77de5d4b389b2cbcd785e96ac89bb1d9fa29
parentea6a433c6cc3875e03f0aa2bdfe7afdcb7a90083
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.

From-SVN: r217891
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