[flang-commits] [flang] [Flang][OpenMP] Fix false positive common block error in LINEAR clause (PR #189170)

Aditya Trivedi via flang-commits flang-commits at lists.llvm.org
Sun Apr 5 03:25:50 PDT 2026


================
@@ -750,9 +750,9 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Linear &x) {
           "The list item `%s` in a LINEAR clause must not be Cray Pointer or a variable with POINTER attribute"_err_en_US,
           symbol->name());
     }
-    if (FindCommonBlockContaining(*symbol)) {
+    if (symbol->has<CommonBlockDetails>()) {
----------------
adit4443ya wrote:

Yes . Sure I added a new commit covering this too with it's testcase.

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


More information about the flang-commits mailing list