diff options
author | Gary Funck <gary@intrepid.com> | 2015-09-21 23:40:29 +0000 |
---|---|---|
committer | Gary Funck <gary@intrepid.com> | 2015-09-21 23:40:29 +0000 |
commit | a72ff34a4e656aa7e4298a457758e825be21be16 (patch) | |
tree | ed5432cbc0ce00b4b10dfe6b2d45d61060af6c77 | |
parent | 85ef66ded571f91088210256d215fb640261ca2f (diff) |
libgupc/testsuite/libgupc.upc/intrepid/gupc-5-branch
test05.upc: Remove dependency upon stable values for gaps in a struct.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gupc-5-branch@227989 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libgupc/testsuite/libgupc.upc/intrepid/ChangeLog | 5 | ||||
-rw-r--r-- | libgupc/testsuite/libgupc.upc/intrepid/test05.upc | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/libgupc/testsuite/libgupc.upc/intrepid/ChangeLog b/libgupc/testsuite/libgupc.upc/intrepid/ChangeLog index a009e670cfe..90bb9c7dbe2 100644 --- a/libgupc/testsuite/libgupc.upc/intrepid/ChangeLog +++ b/libgupc/testsuite/libgupc.upc/intrepid/ChangeLog @@ -1,3 +1,8 @@ +2015-09-21 Gary Funck <gary@intrepid.com> + + * test05.upc: Remove dependency upon stable values for gaps + in a struct. + 2014-04-16 Gary Funck <gary@intrepid.com> * test26..upc: Add test case for comparisons involving diff --git a/libgupc/testsuite/libgupc.upc/intrepid/test05.upc b/libgupc/testsuite/libgupc.upc/intrepid/test05.upc index b0fb36c99b3..307f6142d4c 100644 --- a/libgupc/testsuite/libgupc.upc/intrepid/test05.upc +++ b/libgupc/testsuite/libgupc.upc/intrepid/test05.upc @@ -48,7 +48,6 @@ test05() for (i = MYTHREAD; i < FACTOR*THREADS; i += THREADS) { struct data_struct * const s = (struct data_struct *)&array[i]; - memset (s, '\0', sizeof (struct data_struct)); s->x1 = i*4 + 1; s->x2 = i*4 + 2; s->x3 = i*4 + 3; @@ -63,14 +62,21 @@ test05() { struct data_struct got = array[i]; struct data_struct expected; - memset (&expected, '\0', sizeof (struct data_struct)); expected.x1 = i*4 + 1; expected.x2 = i*4 + 2; expected.x3 = i*4 + 3; expected.x4 = i*4 + 4; for (j = 0; j < 5; ++j) expected.x5[j] = i*4 + j + 5; - if (memcmp(&got, &expected, sizeof(struct data_struct))) + if ((got.x1 != expected.x1) + || (got.x2 != expected.x2) + || (got.x3 != expected.x3) + || (got.x4 != expected.x4) + || (got.x5[0] != expected.x5[0]) + || (got.x5[1] != expected.x5[1]) + || (got.x5[2] != expected.x5[2]) + || (got.x5[3] != expected.x5[3]) + || (got.x5[4] != expected.x5[4])) { fprintf(stderr, "test05: error at element %d." " Expected (%d,%d,%d,%lld,%d,%d,%d,%d,%d)," |