summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wstrict-overflow-11.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-24 20:44:45 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-24 20:44:45 +0000
commitc7addd8cb1e57b2c404c48c43a027360a96cb185 (patch)
tree99bf754860728790f12fd6d1c13768b33b045464 /gcc/testsuite/gcc.dg/Wstrict-overflow-11.c
parent6105e514e2a6ff269a863d2ccbf800d25c17f05e (diff)
downloadgcc-c7addd8cb1e57b2c404c48c43a027360a96cb185.tar.gz
./:
PR tree-optimization/31602 * tree-ssa-loop-ch.c (copy_loop_headers): Set TREE_NO_WARNING for conditionals in the copied loop header. * tree-cfg.c (fold_cond_expr_cond): Don't issue undefined overflow warnings if TREE_NO_WARNING is set. * doc/invoke.texi (Warning Options): Clarify that -Wstrict-overflow does not warn about loops. testsuite/: PR tree-optimization/31602 * gcc.dg/Wstrict-overflow-11.c: We no longer issue a warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124120 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/Wstrict-overflow-11.c')
-rw-r--r--gcc/testsuite/gcc.dg/Wstrict-overflow-11.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/Wstrict-overflow-11.c b/gcc/testsuite/gcc.dg/Wstrict-overflow-11.c
index c98610e48a6..3caf1cb6f09 100644
--- a/gcc/testsuite/gcc.dg/Wstrict-overflow-11.c
+++ b/gcc/testsuite/gcc.dg/Wstrict-overflow-11.c
@@ -3,14 +3,16 @@
/* Based on strict-overflow-5.c. */
-/* We can only unroll when using strict overflow semantics. */
+/* We can only unroll when using strict overflow semantics. But we
+ don't issue a warning for relying on undefined overflow in
+ loops. */
int foo (int i)
{
int index;
int r=0;
- for (index = i; index <= i+4; index+=2) /* { dg-warning "assuming signed overflow does not occur" "correct warning" } */
+ for (index = i; index <= i+4; index+=2)
r++;
return r;