Message ID | CAKdteOaTRf9Hm+P0wir0+EN8+GoDc73XS=Dj0LsjX4i7yg4q5g@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Jan 31, 2017 at 01:42:31PM +0100, Christophe Lyon wrote: > The updated test does not link when using newlib, missing random(). > > The small attached patch fixes this by calling rand() instead. > Tested on arm-none-eabi, aarch64-elf. > > OK? > > Christophe Okay, thanks! Segher > 2017-01-31 Christophe Lyon <christophe.lyon@linaro.org> > > * gcc.dg/memcmp-1.c (static void test_driver_memcmp): Call > rand() instead of random().
diff --git a/gcc/testsuite/gcc.dg/memcmp-1.c b/gcc/testsuite/gcc.dg/memcmp-1.c index b4fd780..828a0ca 100644 --- a/gcc/testsuite/gcc.dg/memcmp-1.c +++ b/gcc/testsuite/gcc.dg/memcmp-1.c @@ -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);