Hi,
The test failed on sparc because sparc doesn't support vect_int_mult.  This
patch adds the prerequisite condition thus skips test on such platforms.

An obvious change, will apply it in 24h.

Thanks,
bin

gcc/testsuite/ChangeLog
2015-07-02  Bin Cheng  <bin.ch...@arm.com>

        PR tree-optimization/66720
        * gcc.dg/vect/pr48052.c: Use dg-require-effective-target
        vect_int_mult.
Index: gcc/testsuite/gcc.dg/vect/pr48052.c
===================================================================
--- gcc/testsuite/gcc.dg/vect/pr48052.c (revision 225094)
+++ gcc/testsuite/gcc.dg/vect/pr48052.c (working copy)
@@ -1,9 +1,9 @@
 /* { dg-do compile } */
-/* { dg-additional-options "-O3" } */
+/* { dg-require-effective-target vect_int_mult } */
 
 int foo(int* A, int* B,  unsigned start, unsigned BS)
 {
-  int s;
+  int s = 0;
   for (unsigned k = start;  k < start + BS; k++)
     {
       s += A[k] * B[k];
@@ -14,7 +14,7 @@ int foo(int* A, int* B,  unsigned start, unsigned
 
 int bar(int* A, int* B, unsigned BS)
 {
-  int s;
+  int s = 0;
   for (unsigned k = 0;  k < BS; k++)
     {
       s += A[k] * B[k];

Reply via email to