From: Jakub Jelinek Date: Tue, 19 Jul 2016 16:47:30 +0000 (+0200) Subject: re PR middle-end/71734 (FAIL: libgomp.fortran/simd4.f90 -O3 -g execution test) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=13da0507f3edc3732100780d2c54a2402b7ea124;p=gcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 36574564a0c..00f0274a018 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2016-07-19 Jakub Jelinek + + 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 PR fortran/71688 diff --git a/gcc/testsuite/g++.dg/vect/pr70729.cc b/gcc/testsuite/g++.dg/vect/pr70729.cc index 014de8c1c47..ff868f7a41b 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 -#include - -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 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; }