[flang-commits] [flang] [flang][runtime] Enable more APIs in the offload build. (PR #76486)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Thu Dec 28 09:35:11 PST 2023


================
@@ -83,8 +89,11 @@ static inline CppTypeFor<RCAT, RKIND> DoDotProduct(
       AccumType accum{};
       if constexpr (RCAT == TypeCategory::Complex) {
         for (SubscriptValue j{0}; j < n; ++j) {
-          accum += std::conj(static_cast<AccumType>(*xp++)) *
+          // std::conj() may instantiate its argument twice,
----------------
klausler wrote:

I don't understand this point.  Unless `std::conj` is a macro, how could it possibly evaluate its argument more than once?

https://github.com/llvm/llvm-project/pull/76486


More information about the flang-commits mailing list