[testsuite] gcc.dg/memcmp-1.c: Fix testcase for newlib.

2017-01-31  Christophe Lyon  <christophe.lyon@linaro.org>

	* gcc.dg/memcmp-1.c (static void test_driver_memcmp): Call
	rand() instead of random().

From-SVN: r245061
This commit is contained in:
Christophe Lyon 2017-01-31 14:03:56 +00:00 committed by Christophe Lyon
parent 4997a71dbb
commit 5b11971a56
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2017-01-31 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.dg/memcmp-1.c (static void test_driver_memcmp): Call
rand() instead of random().
2017-01-30 Aldy Hernandez <aldyh@redhat.com>
PR tree-optimization/71691

View File

@ -28,12 +28,12 @@ static void test_driver_memcmp (void (test_memcmp)(const char *, const char *, i
for(l=0;l<sz;l++) {
for(i=0;i<NRAND/sz;i++) {
for(j=0;j<l;j++) {
buf1[j] = random() & 0xff;
buf1[j] = rand() & 0xff;
buf2[j] = buf1[j];
}
for(j=l;j<sz;j++) {
buf1[j] = random() & 0xff;
buf2[j] = random() & 0xff;
buf1[j] = rand() & 0xff;
buf2[j] = rand() & 0xff;
}
}
e = lib_memcmp(buf1,buf2,sz);