{"action":"created","comment":{"url":"https://api.github.com/repos/flang-compiler/f18/pulls/comments/223889999","pull_request_review_id":163129584,"id":223889999,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzg4OTk5OQ==","diff_hunk":"@@ -0,0 +1,270 @@\n+// Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+#include \"check-do-concurrent.h\"\n+#include \"attr.h\"\n+#include \"scope.h\"\n+#include \"symbol.h\"\n+#include \"../parser/message.h\"\n+#include \"../parser/parse-tree-visitor.h\"\n+\n+namespace Fortran::semantics {\n+\n+using namespace parser::literals;\n+\n+// 11.1.7.5 - enforce semantics constraints on a DO CONCURRENT loop body\n+class DoConcurrentEnforcement {\n+public:\n+  DoConcurrentEnforcement(parser::Messages &messages) : messages_{messages} {}\n+  std::set<parser::Label> labels() { return labels_; }\n+  template<typename T> bool Pre(const T &) { return true; }\n+  template<typename T> void Post(const T &) {}\n+  template<typename T> bool Pre(const parser::Statement<T> &statement) {\n+    charBlock_ = statement.source;\n+    if (statement.label.has_value()) {\n+      labels_.insert(*statement.label);\n+    }\n+    return true;\n+  }\n+  // C1136\n+  void Post(const parser::ReturnStmt &) {\n+    messages_.Say(charBlock_,\n+        parser::MessageFormattedText{\n+            \"RETURN not allowed in DO CONCURRENT\"_err_en_US});\n+  }\n+  // C1137\n+  void NoImageControl() {\n+    messages_.Say(charBlock_,\n+        parser::MessageFormattedText{\n+            \"image control statement not allowed in DO CONCURRENT\"_err_en_US});\n+  }\n+  void Post(const parser::SyncAllStmt &) { NoImageControl(); }\n+  void Post(const parser::SyncImagesStmt &) { NoImageControl(); }\n+  void Post(const parser::SyncMemoryStmt &) { NoImageControl(); }\n+  void Post(const parser::SyncTeamStmt &) { NoImageControl(); }\n+  void Post(const parser::ChangeTeamConstruct &) { NoImageControl(); }\n+  void Post(const parser::CriticalConstruct &) { NoImageControl(); }\n+  void Post(const parser::EventPostStmt &) { NoImageControl(); }\n+  void Post(const parser::EventWaitStmt &) { NoImageControl(); }\n+  void Post(const parser::FormTeamStmt &) { NoImageControl(); }\n+  void Post(const parser::LockStmt &) { NoImageControl(); }\n+  void Post(const parser::UnlockStmt &) { NoImageControl(); }\n+  void Post(const parser::StopStmt &) { NoImageControl(); }\n+  void Post(const parser::EndProgramStmt &) { NoImageControl(); }\n+\n+  void Post(const parser::AllocateStmt &) {\n+    if (anyObjectIsCoarray()) {\n+      messages_.Say(charBlock_,\n+          parser::MessageFormattedText{\n+              \"ALLOCATE coarray not allowed in DO CONCURRENT\"_err_en_US});\n+    }\n+  }\n+  void Post(const parser::DeallocateStmt &) {\n+    if (anyObjectIsCoarray()) {\n+      messages_.Say(charBlock_,\n+          parser::MessageFormattedText{\n+              \"DEALLOCATE coarray not allowed in DO CONCURRENT\"_err_en_US});\n+    }\n+    // C1140: deallocation of polymorphic objects\n+    if (anyObjectIsPolymorphic()) {\n+      messages_.Say(charBlock_,\n+          parser::MessageFormattedText{\n+              \"DEALLOCATE polymorphic object(s)\"\n+              \" not allowed in DO CONCURRENT\"_err_en_US});\n+    }\n+  }\n+  template<typename T> void Post(const parser::Statement<T> &) {\n+    if (EndTDeallocatesCoarray()) {\n+      messages_.Say(charBlock_,\n+          parser::MessageFormattedText{\n+              \"implicit deallocation of coarray not allowed\"\n+              \" in DO CONCURRENT\"_err_en_US});\n+    }\n+  }\n+  // C1141: cannot call ieee_get_flag, ieee_[gs]et_halting_mode\n+  void Post(const parser::ProcedureDesignator &procedureDesignator) {\n+    if (auto *name{std::get_if<parser::Name>(&procedureDesignator.u)}) {\n+      // C1137: call move_alloc with coarray arguments\n+      if (parser::ToUpperCaseLetters(name->ToString()) == \"MOVE_ALLOC\"s) {","path":"lib/semantics/check-do-concurrent.cc","position":null,"original_position":99,"commit_id":"93303cd50de3a150802ac61f249e19b9965512c6","original_commit_id":"e65f755fe1ee4efea8e95713d03bad6842236ff4","user":{"login":"schweitzpgi","id":22080509,"node_id":"MDQ6VXNlcjIyMDgwNTA5","avatar_url":"https://avatars0.githubusercontent.com/u/22080509?v=4","gravatar_id":"","url":"https://api.github.com/users/schweitzpgi","html_url":"https://github.com/schweitzpgi","followers_url":"https://api.github.com/users/schweitzpgi/followers","following_url":"https://api.github.com/users/schweitzpgi/following{/other_user}","gists_url":"https://api.github.com/users/schweitzpgi/gists{/gist_id}","starred_url":"https://api.github.com/users/schweitzpgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schweitzpgi/subscriptions","organizations_url":"https://api.github.com/users/schweitzpgi/orgs","repos_url":"https://api.github.com/users/schweitzpgi/repos","events_url":"https://api.github.com/users/schweitzpgi/events{/privacy}","received_events_url":"https://api.github.com/users/schweitzpgi/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2018-10-09T22:54:14Z","updated_at":"2018-10-09T22:54:14Z","html_url":"https://github.com/flang-compiler/f18/pull/196#discussion_r223889999","pull_request_url":"https://api.github.com/repos/flang-compiler/f18/pulls/196","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/comments/223889999"},"html":{"href":"https://github.com/flang-compiler/f18/pull/196#discussion_r223889999"},"pull_request":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/196"}},"in_reply_to_id":223879868},"pull_request":{"url":"https://api.github.com/repos/flang-compiler/f18/pulls/196","id":219472167,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NDcyMTY3","html_url":"https://github.com/flang-compiler/f18/pull/196","diff_url":"https://github.com/flang-compiler/f18/pull/196.diff","patch_url":"https://github.com/flang-compiler/f18/pull/196.patch","issue_url":"https://api.github.com/repos/flang-compiler/f18/issues/196","number":196,"state":"open","locked":false,"title":"DO CONCURRENT semantic constraints checking","user":{"login":"schweitzpgi","id":22080509,"node_id":"MDQ6VXNlcjIyMDgwNTA5","avatar_url":"https://avatars0.githubusercontent.com/u/22080509?v=4","gravatar_id":"","url":"https://api.github.com/users/schweitzpgi","html_url":"https://github.com/schweitzpgi","followers_url":"https://api.github.com/users/schweitzpgi/followers","following_url":"https://api.github.com/users/schweitzpgi/following{/other_user}","gists_url":"https://api.github.com/users/schweitzpgi/gists{/gist_id}","starred_url":"https://api.github.com/users/schweitzpgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schweitzpgi/subscriptions","organizations_url":"https://api.github.com/users/schweitzpgi/orgs","repos_url":"https://api.github.com/users/schweitzpgi/repos","events_url":"https://api.github.com/users/schweitzpgi/events{/privacy}","received_events_url":"https://api.github.com/users/schweitzpgi/received_events","type":"User","site_admin":false},"body":"Add tests for DO CONCURRENT","created_at":"2018-10-01T18:31:03Z","updated_at":"2018-10-09T22:54:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc96abb5ecccffe9bc96fe1007332763f7d78dbf","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sscalpone","id":504306,"node_id":"MDQ6VXNlcjUwNDMwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/504306?v=4","gravatar_id":"","url":"https://api.github.com/users/sscalpone","html_url":"https://github.com/sscalpone","followers_url":"https://api.github.com/users/sscalpone/followers","following_url":"https://api.github.com/users/sscalpone/following{/other_user}","gists_url":"https://api.github.com/users/sscalpone/gists{/gist_id}","starred_url":"https://api.github.com/users/sscalpone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sscalpone/subscriptions","organizations_url":"https://api.github.com/users/sscalpone/orgs","repos_url":"https://api.github.com/users/sscalpone/repos","events_url":"https://api.github.com/users/sscalpone/events{/privacy}","received_events_url":"https://api.github.com/users/sscalpone/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/flang-compiler/f18/pulls/196/commits","review_comments_url":"https://api.github.com/repos/flang-compiler/f18/pulls/196/comments","review_comment_url":"https://api.github.com/repos/flang-compiler/f18/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flang-compiler/f18/issues/196/comments","statuses_url":"https://api.github.com/repos/flang-compiler/f18/statuses/93303cd50de3a150802ac61f249e19b9965512c6","head":{"label":"flang-compiler:eas6","ref":"eas6","sha":"93303cd50de3a150802ac61f249e19b9965512c6","user":{"login":"flang-compiler","id":27519978,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NTE5OTc4","avatar_url":"https://avatars2.githubusercontent.com/u/27519978?v=4","gravatar_id":"","url":"https://api.github.com/users/flang-compiler","html_url":"https://github.com/flang-compiler","followers_url":"https://api.github.com/users/flang-compiler/followers","following_url":"https://api.github.com/users/flang-compiler/following{/other_user}","gists_url":"https://api.github.com/users/flang-compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/flang-compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flang-compiler/subscriptions","organizations_url":"https://api.github.com/users/flang-compiler/orgs","repos_url":"https://api.github.com/users/flang-compiler/repos","events_url":"https://api.github.com/users/flang-compiler/events{/privacy}","received_events_url":"https://api.github.com/users/flang-compiler/received_events","type":"Organization","site_admin":false},"repo":{"id":118970343,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg5NzAzNDM=","name":"f18","full_name":"flang-compiler/f18","private":false,"owner":{"login":"flang-compiler","id":27519978,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NTE5OTc4","avatar_url":"https://avatars2.githubusercontent.com/u/27519978?v=4","gravatar_id":"","url":"https://api.github.com/users/flang-compiler","html_url":"https://github.com/flang-compiler","followers_url":"https://api.github.com/users/flang-compiler/followers","following_url":"https://api.github.com/users/flang-compiler/following{/other_user}","gists_url":"https://api.github.com/users/flang-compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/flang-compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flang-compiler/subscriptions","organizations_url":"https://api.github.com/users/flang-compiler/orgs","repos_url":"https://api.github.com/users/flang-compiler/repos","events_url":"https://api.github.com/users/flang-compiler/events{/privacy}","received_events_url":"https://api.github.com/users/flang-compiler/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/flang-compiler/f18","description":"F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler","fork":false,"url":"https://api.github.com/repos/flang-compiler/f18","forks_url":"https://api.github.com/repos/flang-compiler/f18/forks","keys_url":"https://api.github.com/repos/flang-compiler/f18/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flang-compiler/f18/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flang-compiler/f18/teams","hooks_url":"https://api.github.com/repos/flang-compiler/f18/hooks","issue_events_url":"https://api.github.com/repos/flang-compiler/f18/issues/events{/number}","events_url":"https://api.github.com/repos/flang-compiler/f18/events","assignees_url":"https://api.github.com/repos/flang-compiler/f18/assignees{/user}","branches_url":"https://api.github.com/repos/flang-compiler/f18/branches{/branch}","tags_url":"https://api.github.com/repos/flang-compiler/f18/tags","blobs_url":"https://api.github.com/repos/flang-compiler/f18/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flang-compiler/f18/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flang-compiler/f18/git/refs{/sha}","trees_url":"https://api.github.com/repos/flang-compiler/f18/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flang-compiler/f18/statuses/{sha}","languages_url":"https://api.github.com/repos/flang-compiler/f18/languages","stargazers_url":"https://api.github.com/repos/flang-compiler/f18/stargazers","contributors_url":"https://api.github.com/repos/flang-compiler/f18/contributors","subscribers_url":"https://api.github.com/repos/flang-compiler/f18/subscribers","subscription_url":"https://api.github.com/repos/flang-compiler/f18/subscription","commits_url":"https://api.github.com/repos/flang-compiler/f18/commits{/sha}","git_commits_url":"https://api.github.com/repos/flang-compiler/f18/git/commits{/sha}","comments_url":"https://api.github.com/repos/flang-compiler/f18/comments{/number}","issue_comment_url":"https://api.github.com/repos/flang-compiler/f18/issues/comments{/number}","contents_url":"https://api.github.com/repos/flang-compiler/f18/contents/{+path}","compare_url":"https://api.github.com/repos/flang-compiler/f18/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flang-compiler/f18/merges","archive_url":"https://api.github.com/repos/flang-compiler/f18/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flang-compiler/f18/downloads","issues_url":"https://api.github.com/repos/flang-compiler/f18/issues{/number}","pulls_url":"https://api.github.com/repos/flang-compiler/f18/pulls{/number}","milestones_url":"https://api.github.com/repos/flang-compiler/f18/milestones{/number}","notifications_url":"https://api.github.com/repos/flang-compiler/f18/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flang-compiler/f18/labels{/name}","releases_url":"https://api.github.com/repos/flang-compiler/f18/releases{/id}","deployments_url":"https://api.github.com/repos/flang-compiler/f18/deployments","created_at":"2018-01-25T21:34:19Z","updated_at":"2018-10-08T18:23:22Z","pushed_at":"2018-10-09T22:51:32Z","git_url":"git://github.com/flang-compiler/f18.git","ssh_url":"git@github.com:flang-compiler/f18.git","clone_url":"https://github.com/flang-compiler/f18.git","svn_url":"https://github.com/flang-compiler/f18","homepage":"","size":2550,"stargazers_count":55,"watchers_count":55,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":8,"open_issues":10,"watchers":55,"default_branch":"master"}},"base":{"label":"flang-compiler:master","ref":"master","sha":"93e68870530184fc0d7c0ce0584b956b0fbf373e","user":{"login":"flang-compiler","id":27519978,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NTE5OTc4","avatar_url":"https://avatars2.githubusercontent.com/u/27519978?v=4","gravatar_id":"","url":"https://api.github.com/users/flang-compiler","html_url":"https://github.com/flang-compiler","followers_url":"https://api.github.com/users/flang-compiler/followers","following_url":"https://api.github.com/users/flang-compiler/following{/other_user}","gists_url":"https://api.github.com/users/flang-compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/flang-compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flang-compiler/subscriptions","organizations_url":"https://api.github.com/users/flang-compiler/orgs","repos_url":"https://api.github.com/users/flang-compiler/repos","events_url":"https://api.github.com/users/flang-compiler/events{/privacy}","received_events_url":"https://api.github.com/users/flang-compiler/received_events","type":"Organization","site_admin":false},"repo":{"id":118970343,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg5NzAzNDM=","name":"f18","full_name":"flang-compiler/f18","private":false,"owner":{"login":"flang-compiler","id":27519978,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NTE5OTc4","avatar_url":"https://avatars2.githubusercontent.com/u/27519978?v=4","gravatar_id":"","url":"https://api.github.com/users/flang-compiler","html_url":"https://github.com/flang-compiler","followers_url":"https://api.github.com/users/flang-compiler/followers","following_url":"https://api.github.com/users/flang-compiler/following{/other_user}","gists_url":"https://api.github.com/users/flang-compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/flang-compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flang-compiler/subscriptions","organizations_url":"https://api.github.com/users/flang-compiler/orgs","repos_url":"https://api.github.com/users/flang-compiler/repos","events_url":"https://api.github.com/users/flang-compiler/events{/privacy}","received_events_url":"https://api.github.com/users/flang-compiler/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/flang-compiler/f18","description":"F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler","fork":false,"url":"https://api.github.com/repos/flang-compiler/f18","forks_url":"https://api.github.com/repos/flang-compiler/f18/forks","keys_url":"https://api.github.com/repos/flang-compiler/f18/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flang-compiler/f18/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flang-compiler/f18/teams","hooks_url":"https://api.github.com/repos/flang-compiler/f18/hooks","issue_events_url":"https://api.github.com/repos/flang-compiler/f18/issues/events{/number}","events_url":"https://api.github.com/repos/flang-compiler/f18/events","assignees_url":"https://api.github.com/repos/flang-compiler/f18/assignees{/user}","branches_url":"https://api.github.com/repos/flang-compiler/f18/branches{/branch}","tags_url":"https://api.github.com/repos/flang-compiler/f18/tags","blobs_url":"https://api.github.com/repos/flang-compiler/f18/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flang-compiler/f18/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flang-compiler/f18/git/refs{/sha}","trees_url":"https://api.github.com/repos/flang-compiler/f18/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flang-compiler/f18/statuses/{sha}","languages_url":"https://api.github.com/repos/flang-compiler/f18/languages","stargazers_url":"https://api.github.com/repos/flang-compiler/f18/stargazers","contributors_url":"https://api.github.com/repos/flang-compiler/f18/contributors","subscribers_url":"https://api.github.com/repos/flang-compiler/f18/subscribers","subscription_url":"https://api.github.com/repos/flang-compiler/f18/subscription","commits_url":"https://api.github.com/repos/flang-compiler/f18/commits{/sha}","git_commits_url":"https://api.github.com/repos/flang-compiler/f18/git/commits{/sha}","comments_url":"https://api.github.com/repos/flang-compiler/f18/comments{/number}","issue_comment_url":"https://api.github.com/repos/flang-compiler/f18/issues/comments{/number}","contents_url":"https://api.github.com/repos/flang-compiler/f18/contents/{+path}","compare_url":"https://api.github.com/repos/flang-compiler/f18/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flang-compiler/f18/merges","archive_url":"https://api.github.com/repos/flang-compiler/f18/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flang-compiler/f18/downloads","issues_url":"https://api.github.com/repos/flang-compiler/f18/issues{/number}","pulls_url":"https://api.github.com/repos/flang-compiler/f18/pulls{/number}","milestones_url":"https://api.github.com/repos/flang-compiler/f18/milestones{/number}","notifications_url":"https://api.github.com/repos/flang-compiler/f18/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flang-compiler/f18/labels{/name}","releases_url":"https://api.github.com/repos/flang-compiler/f18/releases{/id}","deployments_url":"https://api.github.com/repos/flang-compiler/f18/deployments","created_at":"2018-01-25T21:34:19Z","updated_at":"2018-10-08T18:23:22Z","pushed_at":"2018-10-09T22:51:32Z","git_url":"git://github.com/flang-compiler/f18.git","ssh_url":"git@github.com:flang-compiler/f18.git","clone_url":"https://github.com/flang-compiler/f18.git","svn_url":"https://github.com/flang-compiler/f18","homepage":"","size":2550,"stargazers_count":55,"watchers_count":55,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":8,"open_issues":10,"watchers":55,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/196"},"html":{"href":"https://github.com/flang-compiler/f18/pull/196"},"issue":{"href":"https://api.github.com/repos/flang-compiler/f18/issues/196"},"comments":{"href":"https://api.github.com/repos/flang-compiler/f18/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/flang-compiler/f18/statuses/93303cd50de3a150802ac61f249e19b9965512c6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"schweitzpgi"}}