From f6bd5664755b207d5bbfedd95231dc62ccfaa1ed Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 6 Sep 2017 12:57:32 +0000 Subject: [PATCH] 20050604-1.c: Adjust to be a better test for correctness of vector lowering. 2017-09-06 Richard Biener * gcc.c-torture/execute/20050604-1.c: Adjust to be a better test for correctness of vector lowering. From-SVN: r251792 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/execute/20050604-1.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c7119a8edfd..0c8f4798d8c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-06 Richard Biener + + * gcc.c-torture/execute/20050604-1.c: Adjust to be a better + test for correctness of vector lowering. + 2017-09-06 Richard Biener PR tree-optimization/82108 diff --git a/gcc/testsuite/gcc.c-torture/execute/20050604-1.c b/gcc/testsuite/gcc.c-torture/execute/20050604-1.c index 6d633890761..c2db2be95d5 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20050604-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20050604-1.c @@ -6,7 +6,7 @@ extern void abort (void); -typedef short v4hi __attribute__ ((vector_size (8))); +typedef unsigned short v4hi __attribute__ ((vector_size (8))); typedef float v4sf __attribute__ ((vector_size (16))); union @@ -26,7 +26,7 @@ foo (void) { unsigned int i; for (i = 0; i < 2; i++) - u.v += (v4hi) { 12, 14 }; + u.v += (v4hi) { 12, 32768 }; for (i = 0; i < 2; i++) v.v += (v4sf) { 18.0, 20.0, 22 }; } @@ -35,7 +35,7 @@ int main (void) { foo (); - if (u.s[0] != 24 || u.s[1] != 28 || u.s[2] || u.s[3]) + if (u.s[0] != 24 || u.s[1] != 0 || u.s[2] || u.s[3]) abort (); if (v.f[0] != 36.0 || v.f[1] != 40.0 || v.f[2] != 44.0 || v.f[3] != 0.0) abort (); -- 2.30.2