On Sun, Nov 23, 2014 at 03:42:43PM -0500, Trevor Saunders wrote: > > Vector arguments or return values often result in -Wpsabi warnings, > > so you certainly want -Wno-psabi in dg-options. > > On the other side, -fPIC should be only used for { target pic }, > > so better put that into dg-additional-options. > > ok, thanks how about this then?
The __attribute__ ((noinline, noclone)) is useless, though not harmful, sorry for missing that. Ok for trunk either way. > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/pr63856.c > @@ -0,0 +1,15 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -Wno-psabi" } */ > +/* { dg-additional-options "-fPIC" { target fpic } } */ > +typedef int v2si __attribute__ ((vector_size (8))); > +typedef short v4hi __attribute__ ((vector_size (8))); > + > +int __attribute__ ((noinline, noclone)) f (v2si A, int N) > +{ > + return ((v4hi) A)[N]; > +} > + > +int __attribute__ ((noinline, noclone)) g (v2si A, int N) > +{ > + return ((v4hi) A)[N]; > +} > -- > 2.1.3 > Jakub