From f4e74b6e4eb14dbdb77035a65768f0f99e9d1106 Mon Sep 17 00:00:00 2001 From: Muhammad Omair Javaid Date: Wed, 14 Jan 2026 13:55:57 +0500 Subject: [PATCH] Revert "[flang][OpenMP] Fix LINEAR clause validation and test expectations (#175707)" This reverts commit 6e62d40b7c65a67ac0e5c6e0f462ce2663db98b9. The change causes test failures clause-validity01.f90 on multiple builders (links below): https://lab.llvm.org/buildbot/#/builders/207/builds/12198 https://lab.llvm.org/buildbot/#/builders/140/builds/36994 https://lab.llvm.org/buildbot/#/builders/50/builds/19637 https://lab.llvm.org/buildbot/#/builders/172/builds/18946 https://lab.llvm.org/buildbot/#/builders/29/builds/20278 https://lab.llvm.org/buildbot/#/builders/80/builds/19622 --- flang/lib/Semantics/check-omp-loop.cpp | 2 +- flang/test/Semantics/OpenMP/linear-clause01.f90 | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/flang/lib/Semantics/check-omp-loop.cpp b/flang/lib/Semantics/check-omp-loop.cpp index a801d526af0a..951dfe1f3bec 100644 --- a/flang/lib/Semantics/check-omp-loop.cpp +++ b/flang/lib/Semantics/check-omp-loop.cpp @@ -764,7 +764,7 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Linear &x) { context_.Say(clauseSource, "A modifier may not be specified in a LINEAR clause on the %s directive"_err_en_US, ContextDirectiveAsFortran()); - // Don't return early - continue to check other restrictions + return; } auto &desc{OmpGetDescriptor()}; diff --git a/flang/test/Semantics/OpenMP/linear-clause01.f90 b/flang/test/Semantics/OpenMP/linear-clause01.f90 index 63b09c07875e..ae4a041c9411 100644 --- a/flang/test/Semantics/OpenMP/linear-clause01.f90 +++ b/flang/test/Semantics/OpenMP/linear-clause01.f90 @@ -7,9 +7,11 @@ ! Case 1 subroutine linear_clause_01(arg) integer, intent(in) :: arg(:) - !ERROR: A modifier may not be specified in a LINEAR clause on the DO directive - !ERROR: List item 'arg' in LINEAR clause must be a scalar variable - !$omp do linear(uval(arg)) +! !ERROR: A modifier may not be specified in a LINEAR clause on the DO directive +! !ERROR: List item 'arg' in LINEAR clause must be a scalar variable +! TODO: the following line currently breaks buildbots. Disabling it until the author +! of the breaking change can fix it. +! !$omp do linear(uval(arg)) do i = 1, 5 print *, arg(i) end do