[PATCH] D79514: [flang] Response to Steve Scalpone's suggestion to improve a message

Pete Steinfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 15:20:27 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG07b69dcf6677: [flang] Response to Steve Scalpone's suggestion to improve a message (authored by PeteSteinfeld).

Changed prior to commit:
  https://reviews.llvm.org/D79514?vs=262461&id=262490#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79514/new/

https://reviews.llvm.org/D79514

Files:
  flang/lib/Evaluate/check-expression.cpp
  flang/test/Semantics/resolve89.f90


Index: flang/test/Semantics/resolve89.f90
===================================================================
--- flang/test/Semantics/resolve89.f90
+++ flang/test/Semantics/resolve89.f90
@@ -58,7 +58,7 @@
   real, dimension(iabs(iArg)) :: arrayVarWithIntrinsic
 
   type arrayType
-    !ERROR: Invalid specification expression: derived type component not allowed to reference to variable 'var'
+    !ERROR: Invalid specification expression: derived type component not allowed to reference variable 'var'
     real, dimension(var) :: varField
     !ERROR: Invalid specification expression: reference to impure function 'ivolatilestmtfunc'
     real, dimension(iVolatileStmtFunc()) :: arrayFieldWithVolatile
@@ -66,7 +66,7 @@
     real, dimension(iImpureStmtFunc()) :: arrayFieldWithImpureFunction
     !ERROR: Invalid specification expression: reference to statement function 'ipurestmtfunc'
     real, dimension(iPureStmtFunc()) :: arrayFieldWithPureFunction
-    !ERROR: Invalid specification expression: derived type component not allowed to reference to variable 'iarg'
+    !ERROR: Invalid specification expression: derived type component not allowed to reference variable 'iarg'
     real, dimension(iabs(iArg)) :: arrayFieldWithIntrinsic
     !ERROR: Invalid specification expression: reference to intrinsic 'allocated' not allowed for derived type components
     real, dimension(merge(1, 2, allocated(allocArg))) :: realField1
@@ -74,7 +74,7 @@
     real, dimension(merge(1, 2, associated(pointerArg))) :: realField2
     !ERROR: Invalid specification expression: non-constant reference to inquiry intrinsic 'is_contiguous' not allowed for derived type components
     real, dimension(merge(1, 2, is_contiguous(arrayArg))) :: realField3
-    !ERROR: Invalid specification expression: derived type component not allowed to reference to variable 'ioarg'
+    !ERROR: Invalid specification expression: derived type component not allowed to reference variable 'ioarg'
     real, dimension(ioArg) :: realField4
     !ERROR: Invalid specification expression: reference to intrinsic 'present' not allowed for derived type components
     real, dimension(merge(1, 2, present(optionalArg))) :: realField5
Index: flang/lib/Evaluate/check-expression.cpp
===================================================================
--- flang/lib/Evaluate/check-expression.cpp
+++ flang/lib/Evaluate/check-expression.cpp
@@ -207,7 +207,7 @@
       return std::nullopt;
     } else if (scope_.IsDerivedType() && IsVariableName(symbol) &&
         specExprContext_ == SpecificationExprContext::BOUND) { // C750
-      return "derived type component not allowed to reference to variable '"s +
+      return "derived type component not allowed to reference variable '"s +
           symbol.name().ToString() + "'";
     } else if (symbol.IsDummy()) {
       if (symbol.attrs().test(semantics::Attr::OPTIONAL)) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79514.262490.patch
Type: text/x-patch
Size: 2895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200506/d9fec508/attachment.bin>


More information about the llvm-commits mailing list