aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2013-06-28 12:31:39 +0200
committerMarc Glisse <glisse@gcc.gnu.org>2013-06-28 10:31:39 +0000
commitee429bdfe0a07195e96d5343bf534fc2e1753613 (patch)
treeb394ca494a062cadce255d15ff7e926e3ea8822b
parent1572e697b780531951456b3c8b39e86f8146146e (diff)
downloadgcc-ee429bdfe0a07195e96d5343bf534fc2e1753613.zip
gcc-ee429bdfe0a07195e96d5343bf534fc2e1753613.tar.gz
gcc-ee429bdfe0a07195e96d5343bf534fc2e1753613.tar.bz2
re PR c++/57509 (Segmentation fault when using __builtin_shuffle in templated class.)
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
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/ext/pr57509.C4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e810fbe..9e7d857 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/g++.dg/ext/pr57509.C b/gcc/testsuite/g++.dg/ext/pr57509.C
index d44ee81..92aaadf 100644
--- a/gcc/testsuite/g++.dg/ext/pr57509.C
+++ b/gcc/testsuite/g++.dg/ext/pr57509.C
@@ -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(){