*ping* Jakub pointed out to me recently that obvious patches are OK even in Stage 4, so if I don't hear any objections in 24 hours, I'll push this.
Thanks, James On Tue, Feb 18, 2014 at 12:35:17PM +0000, James Greenhalgh wrote: > > Hi, > > This test fails on a linux build because it tries to use the > LONG_LONG_{MAX/MIN} macros from "types.h". These are not guaranteed > to exist, and my system "types.h" doesn't provide them. C99 provides > LLONG_{MIN/MAX} for this purpose. > > A gnu89 baremetal compiler doesn't seem to carry these macros > so we must add -std=c99. > > But then this testcase doesn't properly declare its functions, relying > on an implicit int return type. > > So I've fixed those up and now the test passes on aarch64-none-elf and > aarch64-none-linux-gnu. > > I guess the patch is obvious and low risk as it is a target > specific test, but as we are late in Stage 4 I'd like > approval before I commit. > > OK? > > Thanks, > James > > --- > gcc/testsuite/ > > 2014-02-18 James Greenhalgh <james.greenha...@arm.com> > > * gcc.target/aarch64/vect-abs.c (dg-options): Add -std=c99. > (LONG_LONG): Use LLONG. > (set_rvector_long): Explicitly return void. > (set_vector_long): Likewise. > (check_vector_long): Likewise. > > diff --git a/gcc/testsuite/gcc.target/aarch64/vect-abs.c > b/gcc/testsuite/gcc.target/aarch64/vect-abs.c > index 954b106..9e0ed99 100644 > --- a/gcc/testsuite/gcc.target/aarch64/vect-abs.c > +++ b/gcc/testsuite/gcc.target/aarch64/vect-abs.c > @@ -1,6 +1,6 @@ > > /* { dg-do run } */ > -/* { dg-options "-O3" } */ > +/* { dg-options "-O3 -std=c99" } */ > > #include "limits.h" > > @@ -37,8 +37,9 @@ extern void abort (void); > SET_RVEC (8, SCHAR) > SET_RVEC (16, SHRT) > SET_RVEC (32, INT) > -SET_RVEC (64, LONG_LONG) > +SET_RVEC (64, LLONG) > > +void > set_rvector_long (pRLONG a) > { > int i; > @@ -49,8 +50,9 @@ set_rvector_long (pRLONG a) > SET_VEC (8, SCHAR) > SET_VEC (16, SHRT) > SET_VEC (32, INT) > -SET_VEC (64, LONG_LONG) > +SET_VEC (64, LLONG) > > +void > set_vector_long (long *__restrict__ a) > { > long i; > @@ -63,6 +65,7 @@ CHECK_VEC (16) > CHECK_VEC (32) > CHECK_VEC (64) > > +void > check_vector_long (long *__restrict__ a, long *__restrict__ b) > { > long i;