[flang-commits] [flang] [flang] Fix unused variable error (NFC) (PR #188358)

Kelvin Li via flang-commits flang-commits at lists.llvm.org
Wed Mar 25 08:47:15 PDT 2026


================
@@ -535,10 +535,11 @@ void DataSharingProcessor::collectPrivatizedSymbols(
   };
 
   llvm::SetVector<const semantics::Scope *> clauseScopes;
-  const semantics::Scope *curScope = collectScopes(semaCtx, eval, clauseScopes);
+  [[maybe_unused]] const semantics::Scope *curScope =
+      collectScopes(semaCtx, eval, clauseScopes);
+  assert(curScope && "couldn't find current scope");
----------------
kkwli wrote:

> Have you tried running gfortran/Fujitsu testsuites?

I ran the gfortran testsuites on AIX. There is no new failure due to this patch.



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


More information about the flang-commits mailing list