aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wstrict-overflow-11.c
diff options
context:
space:
mode:
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 c98610e..3caf1cb 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;