Message ID | CAKSNEw5+UjiORX2foyX-FsoN0PxcWHzczZjp3JA1SFANMg1q_A@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Sun, Jul 17, 2011 at 7:57 AM, Ira Rosen <ira.rosen@linaro.org> wrote: > On 15 July 2011 15:56, Ulrich Weigand <uweigand@de.ibm.com> wrote: >> Ira Rosen wrote: >> >>> * gcc.dg/vect/pr49038.c: New test. >> >>> Index: testsuite/gcc.dg/vect/pr49038.c >>> =================================================================== >>> --- testsuite/gcc.dg/vect/pr49038.c (revision 0) >>> +++ testsuite/gcc.dg/vect/pr49038.c (revision 0) >>> @@ -0,0 +1,38 @@ >>> +#include <sys/mman.h> >>> +#include <stdio.h> >>> + >>> +#define COUNT 320 >>> +#define MMAP_SIZE 0x10000 >>> +#define ADDRESS 0x1122000000 >>> +#define TYPE unsigned short >> >> This test fails on spu-elf, and presumably all other targets that >> don't have mmap (or <sys/mman.h>) ... >> >> Can the test be restricted to those targets that actually support >> that OS feature? > > I copied the list of targets from gcc.dg/20050826-1.c. > > Tested on x86_64-suse-linux. > OK to apply? Ok. THanks, Richard. > Thanks, > Ira > > > ChangeLog: > > * gcc.dg/vect/pr49038.c: Run only on targets that support mmap. > > > Index: gcc.dg/vect/pr49038.c > =================================================================== > --- gcc.dg/vect/pr49038.c (revision 175681) > +++ gcc.dg/vect/pr49038.c (working copy) > @@ -1,3 +1,5 @@ > +/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* > alpha*-*-linux* powerpc*-*-linux* s390*-*-linux* sparc*-*-linux* > *-*-darwin* } } */ > + > #include <sys/mman.h> > #include <stdio.h> > > > > >> >> Thanks, >> Ulrich >> >> -- >> Dr. Ulrich Weigand >> GNU Toolchain for Linux on System z and Cell BE >> Ulrich.Weigand@de.ibm.com >> >
Ira Rosen <ira.rosen@linaro.org> writes: >> This test fails on spu-elf, and presumably all other targets that >> don't have mmap (or <sys/mman.h>) ... >> >> Can the test be restricted to those targets that actually support >> that OS feature? > > I copied the list of targets from gcc.dg/20050826-1.c. Sorry, but this is a bad idea: having such a list once might be acceptable, but copying it around guarantees that the copies will diverge. Besided, this list already is way incomplete: e.g. *-*-solaris2*, alpha*-dec-osf* and mips-sgi-irix* are missing, and probably many more like the *BSDs. I'll change this into an effective-target keyword and replace the hardcoded list by a compile test for <sys/mman.h>. Rainer
Index: gcc.dg/vect/pr49038.c =================================================================== --- gcc.dg/vect/pr49038.c (revision 175681) +++ gcc.dg/vect/pr49038.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* alpha*-*-linux* powerpc*-*-linux* s390*-*-linux* sparc*-*-linux* *-*-darwin* } } */ + #include <sys/mman.h>