Hi! On Thu, Jun 27, 2013 at 01:59:37PM +0200, Marc Glisse wrote: > --- testsuite/g++.dg/ext/pr57509.C (revision 0) > +++ testsuite/g++.dg/ext/pr57509.C (revision 0) > @@ -0,0 +1,16 @@ > +/* { dg-do compile } */ > +/* { dg-options "-std=c++11" } */ > + > +template <bool> struct enable_if {}; > +template <> struct enable_if<true> {typedef void type;}; > +template <class T> void f (T& v) { v = __builtin_shuffle (v, v); } > +template <class T> void g (T) {} > +template <class T> auto g (T x) -> typename > enable_if<sizeof(__builtin_shuffle(x,x))!=2>::type {} > +typedef int v4i __attribute__((vector_size(4*sizeof(int)))); > +typedef float v4f __attribute__((vector_size(4*sizeof(float)))); > +int main(){ > + v4i a = {1,2,3,0}; > + f(a); > + v4f b = {1,2,3,0}; > + g(b); > +}
Note this testcase fails on i686-linux: /usr/src/gcc/gcc/testsuite/g++.dg/ext/pr57509.C: In function 'int main()': /usr/src/gcc/gcc/testsuite/g++.dg/ext/pr57509.C:15:7: warning: SSE vector argument without SSE enabled changes the ABI [enabled by default] /usr/src/gcc/gcc/testsuite/g++.dg/ext/pr57509.C:15:7: warning: SSE vector argument without SSE enabled changes the ABI [enabled by default] /usr/src/gcc/gcc/testsuite/g++.dg/ext/pr57509.C:15:7: note: The ABI for passing parameters with 16-byte alignment has changed in GCC 4.6 The note is actually pruned, but the warnings aren't. -Wno-abi -Wno-psabi doesn't help, but -w does, so I'd suggest just to add -w to dg-options. Jakub