diff --git a/src/OpenFOAM/primitives/Tensor/TensorI.H b/src/OpenFOAM/primitives/Tensor/TensorI.H index 974129af2c7fd67075f5996cbff85dc8399e515e..94957e2e0805b9b0db7f8ceb283cb25d56458d2c 100644 --- a/src/OpenFOAM/primitives/Tensor/TensorI.H +++ b/src/OpenFOAM/primitives/Tensor/TensorI.H @@ -1043,6 +1043,10 @@ operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2) //- Inner-product of a Tensor and a Vector template<class Cmpt> +#if defined(__GNUC__) && !defined(__clang__) +// Workaround for gcc (11+) that fails to handle tensor dot vector +__attribute__((optimize("no-tree-vectorize"))) +#endif inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt>>::type operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v) {