From a2a40ee85be27a37cb84341fb21b6abc497be175 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 10 Aug 2012 22:21:23 +0200 Subject: [PATCH] vector-shuffle1.c (f): Pass vectors indirectly to avoid warnings. * gcc.dg/torture/vector-shuffle1.c (f): Pass vectors indirectly to avoid warnings. (main): Adjust caller. From-SVN: r190302 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/torture/vector-shuffle1.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0602c043a29..50c97413c15 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-08-10 Jakub Jelinek + + * gcc.dg/torture/vector-shuffle1.c (f): Pass vectors indirectly + to avoid warnings. + (main): Adjust caller. + 2012-08-10 Richard Guenther * gcc.dg/matrix/*.c: Adjust and move ... diff --git a/gcc/testsuite/gcc.dg/torture/vector-shuffle1.c b/gcc/testsuite/gcc.dg/torture/vector-shuffle1.c index 9fa4f217587..14e435b8ad7 100644 --- a/gcc/testsuite/gcc.dg/torture/vector-shuffle1.c +++ b/gcc/testsuite/gcc.dg/torture/vector-shuffle1.c @@ -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; -- 2.30.2