[flang-commits] [flang] a8be1a3 - [flang][NFC] Fix typo in Cray pointee error message

Kelvin Li via flang-commits flang-commits at lists.llvm.org
Mon Jan 16 11:09:49 PST 2023


Author: Kelvin Li
Date: 2023-01-16T14:09:01-05:00
New Revision: a8be1a3dd3b61fb8aef19b5c14737edc6211c5b7

URL: https://github.com/llvm/llvm-project/commit/a8be1a3dd3b61fb8aef19b5c14737edc6211c5b7
DIFF: https://github.com/llvm/llvm-project/commit/a8be1a3dd3b61fb8aef19b5c14737edc6211c5b7.diff

LOG: [flang][NFC] Fix typo in Cray pointee error message

Added: 
    

Modified: 
    flang/lib/Semantics/check-declarations.cpp
    flang/test/Semantics/resolve61.f90

Removed: 
    


################################################################################
diff  --git a/flang/lib/Semantics/check-declarations.cpp b/flang/lib/Semantics/check-declarations.cpp
index 636410d7bf60b..d9c13df031ca2 100644
--- a/flang/lib/Semantics/check-declarations.cpp
+++ b/flang/lib/Semantics/check-declarations.cpp
@@ -798,7 +798,7 @@ void CheckHelper::CheckArraySpec(
   std::optional<parser::MessageFixedText> msg;
   if (symbol.test(Symbol::Flag::CrayPointee) && !isExplicit &&
       !canBeAssumedSize) {
-    msg = "Cray pointee '%s' must have must have explicit shape or"
+    msg = "Cray pointee '%s' must have explicit shape or"
           " assumed size"_err_en_US;
   } else if (IsAllocatableOrPointer(symbol) && !canBeDeferred &&
       !isAssumedRank) {

diff  --git a/flang/test/Semantics/resolve61.f90 b/flang/test/Semantics/resolve61.f90
index 5223614b21702..73f6ccbf96669 100644
--- a/flang/test/Semantics/resolve61.f90
+++ b/flang/test/Semantics/resolve61.f90
@@ -40,12 +40,12 @@ subroutine p6
 end
 
 subroutine p7
-  !ERROR: Cray pointee 'b' must have must have explicit shape or assumed size
+  !ERROR: Cray pointee 'b' must have explicit shape or assumed size
   pointer(a, b(:))
 contains
   subroutine s(x, y)
     real :: x(*)  ! assumed size
-    !ERROR: Cray pointee 'y' must have must have explicit shape or assumed size
+    !ERROR: Cray pointee 'y' must have explicit shape or assumed size
     real :: y(:)  ! assumed shape
     pointer(w, y)
   end


        


More information about the flang-commits mailing list