[flang-commits] [flang] [flang] Fixed -Werror build after #65919. (PR #66679)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Mon Sep 18 11:09:56 PDT 2023


https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/66679

None

>From 3aefd403db68932b0b24583a79e785dea1998fc8 Mon Sep 17 00:00:00 2001
From: Slava Zakharin <szakharin at nvidia.com>
Date: Mon, 18 Sep 2023 11:06:43 -0700
Subject: [PATCH] [flang] Fixed -Werror build after #65919.

---
 flang/lib/Optimizer/Analysis/AliasAnalysis.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp b/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
index 645b5b8bb51dbe9..767ef2e8fa7dc08 100644
--- a/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+++ b/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
@@ -138,12 +138,12 @@ AliasResult AliasAnalysis::alias(Value lhs, Value rhs) {
   if (src1->kind == SourceKind::Allocate)
     return AliasResult::NoAlias;
 
-  assert((src1->kind == SourceKind::Global &&
-          (src2->kind == SourceKind::Argument ||
-           src2->kind == SourceKind::HostAssoc)) ||
-         (src1->kind == SourceKind::Argument &&
-          src2->kind == SourceKind::HostAssoc) &&
-             "unexpected memory source kinds");
+  assert(((src1->kind == SourceKind::Global &&
+           (src2->kind == SourceKind::Argument ||
+            src2->kind == SourceKind::HostAssoc)) ||
+          (src1->kind == SourceKind::Argument &&
+           src2->kind == SourceKind::HostAssoc)) &&
+         "unexpected memory source kinds");
 
   if (src1->kind == SourceKind::Argument &&
       src2->kind == SourceKind::HostAssoc) {



More information about the flang-commits mailing list