From c1c75660896efd3c79a61cb9d14de922d9cad71f Mon Sep 17 00:00:00 2001 From: paboyle Date: Sat, 6 May 2017 15:20:25 +0100 Subject: [PATCH] GCC bug work around in 5.0 through 6.2 inclusive. --- configure.ac | 6 +----- lib/simd/Grid_vector_types.h | 8 +++++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 07c25473..a1139ee0 100644 --- a/configure.ac +++ b/configure.ac @@ -28,11 +28,7 @@ AC_DEFINE_UNQUOTED([GXX_VERSION],["$GXX_VERSION"], [version of g++ that will compile the code]) CXXFLAGS="-O3 $CXXFLAGS" -case ${GXX_VERSION} in - 6.0.0|6.1.0|6.2.0|5.4.1|5.4.0|5.3.0|5.2.0|5.1.0|5.0.0) - CXXFLAGS="-O3 $CXXFLAGS" - ;; -esac + ############### Checks for typedefs, structures, and compiler characteristics AC_TYPE_SIZE_T AC_TYPE_UINT32_T diff --git a/lib/simd/Grid_vector_types.h b/lib/simd/Grid_vector_types.h index c7220e7c..15e30f02 100644 --- a/lib/simd/Grid_vector_types.h +++ b/lib/simd/Grid_vector_types.h @@ -327,6 +327,10 @@ class Grid_simd { // provides support /////////////////////////////////////// +#if (__GNUC__ == 5 ) || ( ( __GNUC__ == 6 ) && __GNUC_MINOR__ < 3 ) +#pragma GCC push_options +#pragma GCC optimize ("O0") +#endif template friend inline Grid_simd SimdApply(const functor &func, const Grid_simd &v) { Grid_simd ret; @@ -355,7 +359,9 @@ class Grid_simd { ret.v = cx.v; return ret; } - +#if (__GNUC__ == 5 ) || ( ( __GNUC__ == 6 ) && __GNUC_MINOR__ < 3 ) +#pragma GCC pop_options +#endif /////////////////////// // Exchange // Al Ah , Bl Bh -> Al Bl Ah,Bh