[flang] Hopefully the last fixup of messages that appear for bad termination
authorPeter Steinfeld <psteinfeld@nvidia.com>
Thu, 11 Apr 2019 18:28:49 +0000 (11:28 -0700)
committerGitHub <noreply@github.com>
Thu, 11 Apr 2019 22:35:44 +0000 (15:35 -0700)
of a DO loop.

Original-commit: flang-compiler/f18@23f7471f3a8490b348d3ca0871c7c377e3173b6d
Reviewed-on: https://github.com/flang-compiler/f18/pull/400

flang/lib/semantics/resolve-labels.cc
flang/test/semantics/canondo07.f90

index aa98196..49d2935 100644 (file)
@@ -898,11 +898,11 @@ void CheckLabelDoConstraints(const SourceStmtList &dos,
               TargetStatementEnum::CompatibleDo)) {
         errorHandler.Say(doTarget.parserCharBlock,
             parser::MessageFormattedText{
-                "END DO or CONTINUE must be used to terminate a labeled DO loop"_err_en_US});
+                "A DO loop should terminate with an END DO or CONTINUE"_err_en_US});
       } else {
         errorHandler.Say(doTarget.parserCharBlock,
             parser::MessageFormattedText{
-                "Only an END DO or CONTINUE should be used to terminate a labeled DO loop"_en_US});
+                "A DO loop should terminate with an END DO or CONTINUE"_en_US});
       }
     } else {
       loopBodies.emplace_back(SkipLabel(position), doTarget.parserCharBlock);
index e457ba3..11e3b88 100644 (file)
@@ -16,7 +16,7 @@
 ! See R1131 and C1131
 
 ! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
-! CHECK: Only an END DO or CONTINUE should be used to terminate a labeled DO loop
+! CHECK: A DO loop should terminate with an END DO or CONTINUE
 
 program endDo
   do 10 i = 1, 5