diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-08-10 22:21:23 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-08-10 22:21:23 +0200 |
commit | a2a40ee85be27a37cb84341fb21b6abc497be175 (patch) | |
tree | 43cc4151c2bcafc871a59a82413f3ee7645f7f70 /gcc | |
parent | 4bf02aaf4d2b1508a9735647410cb1ea365bcbbc (diff) | |
download | gcc-a2a40ee85be27a37cb84341fb21b6abc497be175.zip gcc-a2a40ee85be27a37cb84341fb21b6abc497be175.tar.gz gcc-a2a40ee85be27a37cb84341fb21b6abc497be175.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | 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 0602c04..50c9741 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 ... diff --git a/gcc/testsuite/gcc.dg/torture/vector-shuffle1.c b/gcc/testsuite/gcc.dg/torture/vector-shuffle1.c index 9fa4f21..14e435b 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; |