{"action":"created","comment":{"url":"https://api.github.com/repos/flang-compiler/f18/pulls/comments/362350973","pull_request_review_id":337510743,"id":362350973,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2MjM1MDk3Mw==","diff_hunk":"@@ -471,5 +471,79 @@ FindPolymorphicAllocatableUltimateComponent(const DerivedTypeSpec &);\n UltimateComponentIterator::const_iterator\n FindPolymorphicAllocatableNonCoarrayUltimateComponent(const DerivedTypeSpec &);\n \n+class LabelEnforce {\n+public:\n+  LabelEnforce(SemanticsContext &context, std::set<parser::Label> &&labels,\n+      parser::CharBlock constructSourcePosition, const char *construct)\n+    : context_{context}, labels_{labels},\n+      constructSourcePosition_{constructSourcePosition}, construct_{construct} {\n+  }\n+  template<typename T> bool Pre(const T &) { return true; }\n+  template<typename T> bool Pre(const parser::Statement<T> &statement) {\n+    currentStatementSourcePosition_ = statement.source;\n+    return true;\n+  }\n+\n+  template<typename T> void Post(const T &) {}\n+\n+  void Post(const parser::GotoStmt &gotoStmt) { checkLabelUse(gotoStmt.v); }\n+  void Post(const parser::ComputedGotoStmt &computedGotoStmt) {","path":"lib/semantics/tools.h","position":null,"original_position":20,"commit_id":"9cc4952b00532dae9e881c57d3f946f5d4a663e3","original_commit_id":"0a551027703754cf52bb18e33158256fb6994238","user":{"login":"kiranchandramohan","id":3768845,"node_id":"MDQ6VXNlcjM3Njg4NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/3768845?v=4","gravatar_id":"","url":"https://api.github.com/users/kiranchandramohan","html_url":"https://github.com/kiranchandramohan","followers_url":"https://api.github.com/users/kiranchandramohan/followers","following_url":"https://api.github.com/users/kiranchandramohan/following{/other_user}","gists_url":"https://api.github.com/users/kiranchandramohan/gists{/gist_id}","starred_url":"https://api.github.com/users/kiranchandramohan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiranchandramohan/subscriptions","organizations_url":"https://api.github.com/users/kiranchandramohan/orgs","repos_url":"https://api.github.com/users/kiranchandramohan/repos","events_url":"https://api.github.com/users/kiranchandramohan/events{/privacy}","received_events_url":"https://api.github.com/users/kiranchandramohan/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2020-01-02T00:03:38Z","updated_at":"2020-01-02T00:03:38Z","html_url":"https://github.com/flang-compiler/f18/pull/897#discussion_r362350973","pull_request_url":"https://api.github.com/repos/flang-compiler/f18/pulls/897","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/comments/362350973"},"html":{"href":"https://github.com/flang-compiler/f18/pull/897#discussion_r362350973"},"pull_request":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/897"}},"in_reply_to_id":362096642},"pull_request":{"url":"https://api.github.com/repos/flang-compiler/f18/pulls/897","id":356915383,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU2OTE1Mzgz","html_url":"https://github.com/flang-compiler/f18/pull/897","diff_url":"https://github.com/flang-compiler/f18/pull/897.diff","patch_url":"https://github.com/flang-compiler/f18/pull/897.patch","issue_url":"https://api.github.com/repos/flang-compiler/f18/issues/897","number":897,"state":"open","locked":false,"title":"Semantic Checks for critical construct","user":{"login":"kiranchandramohan","id":3768845,"node_id":"MDQ6VXNlcjM3Njg4NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/3768845?v=4","gravatar_id":"","url":"https://api.github.com/users/kiranchandramohan","html_url":"https://github.com/kiranchandramohan","followers_url":"https://api.github.com/users/kiranchandramohan/followers","following_url":"https://api.github.com/users/kiranchandramohan/following{/other_user}","gists_url":"https://api.github.com/users/kiranchandramohan/gists{/gist_id}","starred_url":"https://api.github.com/users/kiranchandramohan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiranchandramohan/subscriptions","organizations_url":"https://api.github.com/users/kiranchandramohan/orgs","repos_url":"https://api.github.com/users/kiranchandramohan/repos","events_url":"https://api.github.com/users/kiranchandramohan/events{/privacy}","received_events_url":"https://api.github.com/users/kiranchandramohan/received_events","type":"User","site_admin":false},"body":"This PR includes checks for the critical construct. Implemented checks include the following,\r\n-> C1119: A branch within a CRITICAL construct shall not have a branch target that is outside the construct. Implemented by refactoring the LabelEnforce class in check-do.cc and putting it in tools.h and using it for CRITICAL construct.\r\n-> C1118: The block of a critical-construct shall not contain a RETURN statement or an image control statement. Implemented directly and using the isimagecontrol function in tools.h.\r\n\r\nHandled by existing code\r\nC1117: Matching names for critical and end critical statements\r\n\r\nNot implemented (TODO)\r\n11.1.6.5: It is permissible to branch to an end-critical-stmt only from within its CRITICAL construct.\r\n\r\n","created_at":"2019-12-26T08:55:45Z","updated_at":"2020-01-02T00:03:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48e888f17a42d7be47c8d1170e02feea45ff78ac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/flang-compiler/f18/pulls/897/commits","review_comments_url":"https://api.github.com/repos/flang-compiler/f18/pulls/897/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/897/comments","statuses_url":"https://api.github.com/repos/flang-compiler/f18/statuses/9cc4952b00532dae9e881c57d3f946f5d4a663e3","head":{"label":"kiranchandramohan:critical-3","ref":"critical-3","sha":"9cc4952b00532dae9e881c57d3f946f5d4a663e3","user":{"login":"kiranchandramohan","id":3768845,"node_id":"MDQ6VXNlcjM3Njg4NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/3768845?v=4","gravatar_id":"","url":"https://api.github.com/users/kiranchandramohan","html_url":"https://github.com/kiranchandramohan","followers_url":"https://api.github.com/users/kiranchandramohan/followers","following_url":"https://api.github.com/users/kiranchandramohan/following{/other_user}","gists_url":"https://api.github.com/users/kiranchandramohan/gists{/gist_id}","starred_url":"https://api.github.com/users/kiranchandramohan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiranchandramohan/subscriptions","organizations_url":"https://api.github.com/users/kiranchandramohan/orgs","repos_url":"https://api.github.com/users/kiranchandramohan/repos","events_url":"https://api.github.com/users/kiranchandramohan/events{/privacy}","received_events_url":"https://api.github.com/users/kiranchandramohan/received_events","type":"User","site_admin":false},"repo":{"id":176572373,"node_id":"MDEwOlJlcG9zaXRvcnkxNzY1NzIzNzM=","name":"f18","full_name":"kiranchandramohan/f18","private":false,"owner":{"login":"kiranchandramohan","id":3768845,"node_id":"MDQ6VXNlcjM3Njg4NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/3768845?v=4","gravatar_id":"","url":"https://api.github.com/users/kiranchandramohan","html_url":"https://github.com/kiranchandramohan","followers_url":"https://api.github.com/users/kiranchandramohan/followers","following_url":"https://api.github.com/users/kiranchandramohan/following{/other_user}","gists_url":"https://api.github.com/users/kiranchandramohan/gists{/gist_id}","starred_url":"https://api.github.com/users/kiranchandramohan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiranchandramohan/subscriptions","organizations_url":"https://api.github.com/users/kiranchandramohan/orgs","repos_url":"https://api.github.com/users/kiranchandramohan/repos","events_url":"https://api.github.com/users/kiranchandramohan/events{/privacy}","received_events_url":"https://api.github.com/users/kiranchandramohan/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kiranchandramohan/f18","description":"F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler","fork":true,"url":"https://api.github.com/repos/kiranchandramohan/f18","forks_url":"https://api.github.com/repos/kiranchandramohan/f18/forks","keys_url":"https://api.github.com/repos/kiranchandramohan/f18/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiranchandramohan/f18/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiranchandramohan/f18/teams","hooks_url":"https://api.github.com/repos/kiranchandramohan/f18/hooks","issue_events_url":"https://api.github.com/repos/kiranchandramohan/f18/issues/events{/number}","events_url":"https://api.github.com/repos/kiranchandramohan/f18/events","assignees_url":"https://api.github.com/repos/kiranchandramohan/f18/assignees{/user}","branches_url":"https://api.github.com/repos/kiranchandramohan/f18/branches{/branch}","tags_url":"https://api.github.com/repos/kiranchandramohan/f18/tags","blobs_url":"https://api.github.com/repos/kiranchandramohan/f18/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiranchandramohan/f18/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiranchandramohan/f18/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiranchandramohan/f18/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiranchandramohan/f18/statuses/{sha}","languages_url":"https://api.github.com/repos/kiranchandramohan/f18/languages","stargazers_url":"https://api.github.com/repos/kiranchandramohan/f18/stargazers","contributors_url":"https://api.github.com/repos/kiranchandramohan/f18/contributors","subscribers_url":"https://api.github.com/repos/kiranchandramohan/f18/subscribers","subscription_url":"https://api.github.com/repos/kiranchandramohan/f18/subscription","commits_url":"https://api.github.com/repos/kiranchandramohan/f18/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiranchandramohan/f18/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiranchandramohan/f18/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiranchandramohan/f18/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiranchandramohan/f18/contents/{+path}","compare_url":"https://api.github.com/repos/kiranchandramohan/f18/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiranchandramohan/f18/merges","archive_url":"https://api.github.com/repos/kiranchandramohan/f18/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiranchandramohan/f18/downloads","issues_url":"https://api.github.com/repos/kiranchandramohan/f18/issues{/number}","pulls_url":"https://api.github.com/repos/kiranchandramohan/f18/pulls{/number}","milestones_url":"https://api.github.com/repos/kiranchandramohan/f18/milestones{/number}","notifications_url":"https://api.github.com/repos/kiranchandramohan/f18/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiranchandramohan/f18/labels{/name}","releases_url":"https://api.github.com/repos/kiranchandramohan/f18/releases{/id}","deployments_url":"https://api.github.com/repos/kiranchandramohan/f18/deployments","created_at":"2019-03-19T18:12:46Z","updated_at":"2019-03-19T18:12:49Z","pushed_at":"2020-01-02T00:00:29Z","git_url":"git://github.com/kiranchandramohan/f18.git","ssh_url":"git@github.com:kiranchandramohan/f18.git","clone_url":"https://github.com/kiranchandramohan/f18.git","svn_url":"https://github.com/kiranchandramohan/f18","homepage":"","size":8534,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flang-compiler:master","ref":"master","sha":"86ae6e6cc85c46958c2446d754650026ba26ff86","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":"2019-12-31T23:25:51Z","pushed_at":"2020-01-02T00:00:31Z","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":8595,"stargazers_count":210,"watchers_count":210,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":40,"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":39,"open_issues":40,"watchers":210,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/897"},"html":{"href":"https://github.com/flang-compiler/f18/pull/897"},"issue":{"href":"https://api.github.com/repos/flang-compiler/f18/issues/897"},"comments":{"href":"https://api.github.com/repos/flang-compiler/f18/issues/897/comments"},"review_comments":{"href":"https://api.github.com/repos/flang-compiler/f18/pulls/897/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/897/commits"},"statuses":{"href":"https://api.github.com/repos/flang-compiler/f18/statuses/9cc4952b00532dae9e881c57d3f946f5d4a663e3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kiranchandramohan"}}