aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-07-19 18:47:30 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-07-19 18:47:30 +0200
commit13da0507f3edc3732100780d2c54a2402b7ea124 (patch)
tree5e3346af5f7cc36222103c42ad54ee7fb381918c /gcc
parentfecfbfa4a290992437a99977381e29815ed9199d (diff)
downloadgcc-13da0507f3edc3732100780d2c54a2402b7ea124.zip
gcc-13da0507f3edc3732100780d2c54a2402b7ea124.tar.gz
gcc-13da0507f3edc3732100780d2c54a2402b7ea124.tar.bz2
re PR middle-end/71734 (FAIL: libgomp.fortran/simd4.f90 -O3 -g execution test)
PR middle-end/71734 * g++.dg/vect/pr70729.cc: Don't include string.h or xmmintrin.h. (my_alloc): Rewritten to use __builtin_posix_memalign and __SIZE_TYPE__. (my_free): Use __builtin_free instead of _mm_free. (Vec::operator=): Use __builtin_memcpy. From-SVN: r238482
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/g++.dg/vect/pr70729.cc10
2 files changed, 12 insertions, 7 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3657456..00f0274 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2016-07-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/71734
+ * g++.dg/vect/pr70729.cc: Don't include string.h or xmmintrin.h.
+ (my_alloc): Rewritten to use __builtin_posix_memalign and
+ __SIZE_TYPE__.
+ (my_free): Use __builtin_free instead of _mm_free.
+ (Vec::operator=): Use __builtin_memcpy.
+
2016-07-19 Martin Jambor <mjambor@suse.cz>
PR fortran/71688
diff --git a/gcc/testsuite/g++.dg/vect/pr70729.cc b/gcc/testsuite/g++.dg/vect/pr70729.cc
index 014de8c..ff868f7 100644
--- a/gcc/testsuite/g++.dg/vect/pr70729.cc
+++ b/gcc/testsuite/g++.dg/vect/pr70729.cc
@@ -2,12 +2,8 @@
// { dg-additional-options "-ffast-math -fopenmp-simd" }
// { dg-additional-options "-msse2" { target x86_64-*-* i?86-*-* } }
-
-#include <string.h>
-#include <xmmintrin.h>
-
-inline void* my_alloc (size_t bytes) {return _mm_malloc (bytes, 128);}
-inline void my_free (void* memory) {_mm_free (memory);}
+inline void* my_alloc (__SIZE_TYPE__ bytes) {void *ptr; __builtin_posix_memalign (&ptr, bytes, 128);}
+inline void my_free (void* memory) {__builtin_free (memory);}
template <typename T>
class Vec
@@ -23,7 +19,7 @@ public:
Vec& operator = (const Vec& other)
{
if (this != &other)
- memcpy (data, other.data, isize*sizeof (T));
+ __builtin_memcpy (data, other.data, isize*sizeof (T));
return *this;
}