Message ID | 000101cc76d6$46b9ea90$d42dbfb0$@Yorsh@arm.com |
---|---|
State | New |
Headers | show |
diff --git a/gcc/testsuite/gcc.c-torture/execute/memcpy-2.c b/gcc/testsuite/gcc.c-torture/execute/memcpy-2.c index f328b64..0182fe6 100644 --- a/gcc/testsuite/gcc.c-torture/execute/memcpy-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/memcpy-2.c @@ -24,7 +24,9 @@ /* Use a sequence length that is not divisible by two, to make it more likely to detect when words are mixed up. */ +#ifndef SEQUENCE_LENGTH #define SEQUENCE_LENGTH 31 +#endif static union { char buf[MAX_LENGTH]; @@ -58,7 +60,7 @@ main () if (*q != 'a') abort (); - for (i = 0, c = 'A' + off2; i < len; i++, q++, c++) + for (i = 0, c = 'A' + (off2 % SEQUENCE_LENGTH); i < len; i++, q++, c++) { if (c >= 'A' + SEQUENCE_LENGTH) c = 'A';