Hi,
The previous patch removes support for -funsafe-loop-optimizations on GIMPLE,
as a follow up, this one marks related tests as XFAIL for the moment. I would
like to either remove/rewrite the case after -funsafe-loop-optimization is
fully dicarded?
Tests checked. Is it OK?
Thanks,
bin
gcc/testsuite/ChangeLog
2016-06-27 Bin Cheng <bin.ch...@arm.com>
* gcc.dg/tree-ssa/pr19210-1.c: xfail unsafe loop opt warnings.
* gcc.dg/tree-ssa/pr19210-2.c: Ditto.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
index 906132c..06713bd 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
@@ -6,10 +6,10 @@ void
f (unsigned n)
{
unsigned k;
- for(k = 0;k <= n;k++) /* { dg-warning "cannot optimize.*infinite loops" } */
+ for(k = 0;k <= n;k++) /* { dg-warning "cannot optimize.*infinite loops" "" {
xfail *-*-* } } */
g();
- for(k = 0;k <= n;k += 4) /* { dg-warning "cannot optimize.*overflow" } */
+ for(k = 0;k <= n;k += 4) /* { dg-warning "cannot optimize.*overflow" "" {
xfail *-*-* } } */
g();
/* We used to get warning for this loop. However, since then # of iterations
@@ -21,9 +21,9 @@ f (unsigned n)
g();
/* So we need the following loop, instead. */
- for(k = 4;k <= n;k += 5) /* { dg-warning "cannot optimize.*overflow" } */
+ for(k = 4;k <= n;k += 5) /* { dg-warning "cannot optimize.*overflow" "" {
xfail *-*-* } } */
g();
- for(k = 15;k >= n;k--) /* { dg-warning "cannot optimize.*infinite" } */
+ for(k = 15;k >= n;k--) /* { dg-warning "cannot optimize.*infinite" "" {
xfail *-*-* } } */
g();
}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-2.c
b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-2.c
index 9116e97..f258085 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-2.c
@@ -6,10 +6,10 @@ void
f (unsigned n)
{
unsigned k;
- for(k = 0;k <= n;k++) /* { dg-warning "assuming.*not infinite" } */
+ for(k = 0;k <= n;k++) /* { dg-warning "assuming.*not infinite" "" { xfail
*-*-* } } */
g();
- for(k = 5;k <= n;k += 4) /* { dg-warning "assuming.*not overflow" } */
+ for(k = 5;k <= n;k += 4) /* { dg-warning "assuming.*not overflow" "" { xfail
*-*-* } } */
g();
/* We used to get warning for this loop. However, since then # of iterations
@@ -20,10 +20,10 @@ f (unsigned n)
for(k = 5;k <= n;k += 5)
g();
- for(k = 4;k <= n;k += 5) /* { dg-warning "assuming.*not overflow" } */
+ for(k = 4;k <= n;k += 5) /* { dg-warning "assuming.*not overflow" "" { xfail
*-*-* } } */
g();
- for(k = 15;k >= n;k--) /* { dg-warning "assuming.*not infinite" } */
+ for(k = 15;k >= n;k--) /* { dg-warning "assuming.*not infinite" "" { xfail
*-*-* } } */
g();
}