Skip to content

Conversation

kparzysz
Copy link
Contributor

No description provided.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:openmp flang:semantics labels Aug 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Aug 22, 2025

@llvm/pr-subscribers-flang-semantics

Author: Krzysztof Parzyszek (kparzysz)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/154953.diff

2 Files Affected:

  • (modified) flang/lib/Semantics/check-omp-structure.cpp (+3-3)
  • (modified) flang/test/Semantics/OpenMP/groupprivate.f90 (+3-3)
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 142423b16334f..5967a18460002 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -1198,13 +1198,13 @@ void OmpStructureChecker::Enter(const parser::OpenMPGroupprivate &x) {
 
     if (sym->has<AssocEntityDetails>()) {
       context_.SayWithDecl(*sym, arg.source,
-          "GROUPPRIVATE argument cannot be an an ASSOCIATE name"_err_en_US);
+          "GROUPPRIVATE argument cannot be an ASSOCIATE name"_err_en_US);
       continue;
     }
     if (auto *obj{sym->detailsIf<ObjectEntityDetails>()}) {
       if (obj->IsCoarray()) {
         context_.Say(arg.source,
-            "GROUPPRIVATE argument cannot be an a coarray"_err_en_US);
+            "GROUPPRIVATE argument cannot be a coarray"_err_en_US);
         continue;
       }
       if (obj->init()) {
@@ -1215,7 +1215,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPGroupprivate &x) {
     }
     if (sym->test(Symbol::Flag::InCommonBlock)) {
       context_.Say(arg.source,
-          "GROUPPRIVATE argument cannot be an a member of a common block"_err_en_US);
+          "GROUPPRIVATE argument cannot be a member of a common block"_err_en_US);
       continue;
     }
     if (!IsCommonBlock(*sym)) {
diff --git a/flang/test/Semantics/OpenMP/groupprivate.f90 b/flang/test/Semantics/OpenMP/groupprivate.f90
index 89afffd9dff65..a875c466111a3 100644
--- a/flang/test/Semantics/OpenMP/groupprivate.f90
+++ b/flang/test/Semantics/OpenMP/groupprivate.f90
@@ -14,7 +14,7 @@ subroutine f00
   integer, save :: y
   associate (z => y)
   block
-    !ERROR: GROUPPRIVATE argument cannot be an an ASSOCIATE name
+    !ERROR: GROUPPRIVATE argument cannot be an ASSOCIATE name
     !$omp groupprivate(z)
   end block
   end associate
@@ -25,7 +25,7 @@ module m01
 implicit none
 integer :: x, y
 common /some_block/ x
-!ERROR: GROUPPRIVATE argument cannot be an a member of a common block
+!ERROR: GROUPPRIVATE argument cannot be a member of a common block
 !$omp groupprivate(x)
 
 contains
@@ -42,6 +42,6 @@ subroutine f01
 module m02
 implicit none
 integer :: x(10)[*]
-!ERROR: GROUPPRIVATE argument cannot be an a coarray
+!ERROR: GROUPPRIVATE argument cannot be a coarray
 !$omp groupprivate(x)
 end module

@llvmbot
Copy link
Member

llvmbot commented Aug 22, 2025

@llvm/pr-subscribers-flang-openmp

Author: Krzysztof Parzyszek (kparzysz)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/154953.diff

2 Files Affected:

  • (modified) flang/lib/Semantics/check-omp-structure.cpp (+3-3)
  • (modified) flang/test/Semantics/OpenMP/groupprivate.f90 (+3-3)
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 142423b16334f..5967a18460002 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -1198,13 +1198,13 @@ void OmpStructureChecker::Enter(const parser::OpenMPGroupprivate &x) {
 
     if (sym->has<AssocEntityDetails>()) {
       context_.SayWithDecl(*sym, arg.source,
-          "GROUPPRIVATE argument cannot be an an ASSOCIATE name"_err_en_US);
+          "GROUPPRIVATE argument cannot be an ASSOCIATE name"_err_en_US);
       continue;
     }
     if (auto *obj{sym->detailsIf<ObjectEntityDetails>()}) {
       if (obj->IsCoarray()) {
         context_.Say(arg.source,
-            "GROUPPRIVATE argument cannot be an a coarray"_err_en_US);
+            "GROUPPRIVATE argument cannot be a coarray"_err_en_US);
         continue;
       }
       if (obj->init()) {
@@ -1215,7 +1215,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPGroupprivate &x) {
     }
     if (sym->test(Symbol::Flag::InCommonBlock)) {
       context_.Say(arg.source,
-          "GROUPPRIVATE argument cannot be an a member of a common block"_err_en_US);
+          "GROUPPRIVATE argument cannot be a member of a common block"_err_en_US);
       continue;
     }
     if (!IsCommonBlock(*sym)) {
diff --git a/flang/test/Semantics/OpenMP/groupprivate.f90 b/flang/test/Semantics/OpenMP/groupprivate.f90
index 89afffd9dff65..a875c466111a3 100644
--- a/flang/test/Semantics/OpenMP/groupprivate.f90
+++ b/flang/test/Semantics/OpenMP/groupprivate.f90
@@ -14,7 +14,7 @@ subroutine f00
   integer, save :: y
   associate (z => y)
   block
-    !ERROR: GROUPPRIVATE argument cannot be an an ASSOCIATE name
+    !ERROR: GROUPPRIVATE argument cannot be an ASSOCIATE name
     !$omp groupprivate(z)
   end block
   end associate
@@ -25,7 +25,7 @@ module m01
 implicit none
 integer :: x, y
 common /some_block/ x
-!ERROR: GROUPPRIVATE argument cannot be an a member of a common block
+!ERROR: GROUPPRIVATE argument cannot be a member of a common block
 !$omp groupprivate(x)
 
 contains
@@ -42,6 +42,6 @@ subroutine f01
 module m02
 implicit none
 integer :: x(10)[*]
-!ERROR: GROUPPRIVATE argument cannot be an a coarray
+!ERROR: GROUPPRIVATE argument cannot be a coarray
 !$omp groupprivate(x)
 end module

Copy link

github-actions bot commented Aug 22, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@kparzysz kparzysz enabled auto-merge (squash) August 22, 2025 14:26
@kparzysz kparzysz merged commit 4a7fdb0 into llvm:main Aug 22, 2025
9 checks passed
@kparzysz kparzysz deleted the users/kparzysz/fix-typos branch August 22, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:openmp flang:semantics flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants