[flang-commits] [flang] [flang][Semantics][OpenMP] Fix ICE for unknown reduction starting with . (PR #94398)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Tue Jun 4 13:27:34 PDT 2024


================
@@ -2321,9 +2321,17 @@ bool OmpStructureChecker::CheckReductionOperators(
   common::visit(
       common::visitors{
           [&](const parser::DefinedOperator &dOpr) {
-            const auto &intrinsicOp{
-                std::get<parser::DefinedOperator::IntrinsicOperator>(dOpr.u)};
-            ok = CheckIntrinsicOperator(intrinsicOp);
+            const auto *intrinsicOp{
----------------
klausler wrote:

`if (const auto *intrinsicOp{...}) { ...` would be better.

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


More information about the flang-commits mailing list