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