re PR c++/57509 (Segmentation fault when using __builtin_shuffle in templated class.)
authorMarc Glisse <marc.glisse@inria.fr>
Fri, 28 Jun 2013 10:31:39 +0000 (12:31 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Fri, 28 Jun 2013 10:31:39 +0000 (10:31 +0000)
2013-06-28  Marc Glisse  <marc.glisse@inria.fr>

PR c++/57509
* g++.dg/ext/pr57509.C: Pass vectors by reference to avoid warnings.

From-SVN: r200511

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/pr57509.C

index e810fbe4ab73f2a01c6b6514645b5e6d89a9bf72..9e7d8577a937d442b2968c6af5e22c0f8ff73756 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-28  Marc Glisse  <marc.glisse@inria.fr>
+
+       PR c++/57509
+       * g++.dg/ext/pr57509.C: Pass vectors by reference to avoid warnings.
+
 2013-06-28  Kirill Yukhin  <kirill.yukhin@intel.com>
 
         * gcc.target/i386/bmi-1.c: Extend with new instrinsic.
index d44ee81e091bab516c5edf6e9205591e24a8c4da..92aaadf3387d9d67956474ce906a2921a339f64a 100644 (file)
@@ -4,8 +4,8 @@
 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 {}
+template <class T> void g (T const&) {}
+template <class T> auto g (T const& 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(){