[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 10:05:20 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:

No, this is fine, just please extend the comment to mention that this new code is a work-around to what is perhaps a bug in clang, not something that a C++ programmer should have to worry about in general.

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


More information about the flang-commits mailing list