diff --git a/src/OpenFOAM/primitives/Tensor/TensorI.H b/src/OpenFOAM/primitives/Tensor/TensorI.H index 4e8cb92c0459bbd3b551c973a645cff794ebef35..cb9fea259a6a07f589eff2b03cc7e482fd996145 100644 --- a/src/OpenFOAM/primitives/Tensor/TensorI.H +++ b/src/OpenFOAM/primitives/Tensor/TensorI.H @@ -641,6 +641,10 @@ operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2) 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) {