aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/undefined-loop-1.c
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2015-03-18 14:27:13 +0000
committerAndrew Stubbs <ams@gcc.gnu.org>2015-03-18 14:27:13 +0000
commitb4f3051a5fc315c5103f034b81e4d4b3c288fdc4 (patch)
tree69b1cb1f705af4cd981f939fff7d9571ae8a9784 /gcc/testsuite/gcc.dg/undefined-loop-1.c
parent1aec2ecce4085a664f489e7a3585d993a9939a1d (diff)
downloadgcc-b4f3051a5fc315c5103f034b81e4d4b3c288fdc4.zip
gcc-b4f3051a5fc315c5103f034b81e4d4b3c288fdc4.tar.gz
gcc-b4f3051a5fc315c5103f034b81e4d4b3c288fdc4.tar.bz2
re PR middle-end/64491 (incorrect warning: loop exit may only be reached after undefined behavior)
Fix PR64491 2015-03-18 Andrew Stubbs <ams@codesourcery.com> PR middle-end/64491 Revert: 2014-11-20 Andrew Stubbs <ams@codesourcery.com> * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Warn if a loop condition would be removed due to undefined behaviour. 2015-03-18 Andrew Stubbs <ams@codesourcery.com> PR middle-end/64491 Revert: 2014-11-20 Andrew Stubbs <ams@codesourcery.com> * gcc.dg/undefined-loop-1.c: New file. * gcc.dg/undefined-loop-2.c: New file. 2014-12-24 Andrew Stubbs <ams@codesourcery.com> PR testsuite/64032 * gcc.dg/undefined-loop-2.c: Don't allow GCC to optimize away the loop exits too early. From-SVN: r221492
Diffstat (limited to 'gcc/testsuite/gcc.dg/undefined-loop-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/undefined-loop-1.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/gcc/testsuite/gcc.dg/undefined-loop-1.c b/gcc/testsuite/gcc.dg/undefined-loop-1.c
deleted file mode 100644
index 80260cc..0000000
--- a/gcc/testsuite/gcc.dg/undefined-loop-1.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Check that loops whose final iteration is undefined are detected. */
-/* { dg-do compile } */
-/* { dg-options "-O2 -Waggressive-loop-optimizations" } */
-
-void doSomething(char);
-
-char array[5];
-
-void
-foo (void)
-{
- int i;
- for (i = 0;
- array[i] /* { dg-message "note: possible undefined statement is here" } */
- && i < 5; /* { dg-warning "loop exit may only be reached after undefined behavior" } */
- i++)
- doSomething(array[i]);
-}