vector-shuffle1.c (f): Pass vectors indirectly to avoid warnings.
authorJakub Jelinek <jakub@redhat.com>
Fri, 10 Aug 2012 20:21:23 +0000 (22:21 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 10 Aug 2012 20:21:23 +0000 (22:21 +0200)
* gcc.dg/torture/vector-shuffle1.c (f): Pass vectors indirectly
to avoid warnings.
(main): Adjust caller.

From-SVN: r190302

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/vector-shuffle1.c

index 0602c043a29b0fc63b941ddc3df96f050657475f..50c97413c15da6b269b8b2e55ce6bff02b27f401 100644 (file)
@@ -1,3 +1,9 @@
+2012-08-10  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.dg/torture/vector-shuffle1.c (f): Pass vectors indirectly
+       to avoid warnings.
+       (main): Adjust caller.
+
 2012-08-10  Richard Guenther  <rguenther@suse.de>
 
        * gcc.dg/matrix/*.c: Adjust and move ...
index 9fa4f217587afa63364329f06eb5f94759cdafcf..14e435b8ad76e8780dfcd04f923ad5d37a8be572 100644 (file)
@@ -5,15 +5,16 @@ extern void abort (void);
 
 typedef int v2si __attribute__((vector_size(2*sizeof(int))));
 
-v2si f(v2si x)
+void f(v2si *x)
 {
   /* This requires canonicalization of the mask to { 1, 0 }.  */
-  return __builtin_shuffle(x,x, (v2si) { 5, 0 });
+  *x = __builtin_shuffle(*x, *x, (v2si) { 5, 0 });
 }
 
 int main()
 {
-  v2si y = f((v2si) { 1, 2 });
+  v2si y = { 1, 2 };
+  f(&y);
   if (y[0] != 2 || y[1] != 1)
     abort ();
   return 0;