{"action":"created","issue":{"url":"https://api.github.com/repos/p4lang/p4c/issues/823","repository_url":"https://api.github.com/repos/p4lang/p4c","labels_url":"https://api.github.com/repos/p4lang/p4c/issues/823/labels{/name}","comments_url":"https://api.github.com/repos/p4lang/p4c/issues/823/comments","events_url":"https://api.github.com/repos/p4lang/p4c/issues/823/events","html_url":"https://github.com/p4lang/p4c/issues/823","id":247823662,"number":823,"title":"Compiler bug: Could not find declaration for MyP2_reject","user":{"login":"hanw","id":125978,"avatar_url":"https://avatars1.githubusercontent.com/u/125978?v=4","gravatar_id":"","url":"https://api.github.com/users/hanw","html_url":"https://github.com/hanw","followers_url":"https://api.github.com/users/hanw/followers","following_url":"https://api.github.com/users/hanw/following{/other_user}","gists_url":"https://api.github.com/users/hanw/gists{/gist_id}","starred_url":"https://api.github.com/users/hanw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanw/subscriptions","organizations_url":"https://api.github.com/users/hanw/orgs","repos_url":"https://api.github.com/users/hanw/repos","events_url":"https://api.github.com/users/hanw/events{/privacy}","received_events_url":"https://api.github.com/users/hanw/received_events","type":"User","site_admin":false},"labels":[{"id":352540661,"url":"https://api.github.com/repos/p4lang/p4c/labels/bug","name":"bug","color":"ee0701","default":true},{"id":500148585,"url":"https://api.github.com/repos/p4lang/p4c/labels/fixed","name":"fixed","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":{"login":"mbudiu-vmw","id":19397042,"avatar_url":"https://avatars1.githubusercontent.com/u/19397042?v=4","gravatar_id":"","url":"https://api.github.com/users/mbudiu-vmw","html_url":"https://github.com/mbudiu-vmw","followers_url":"https://api.github.com/users/mbudiu-vmw/followers","following_url":"https://api.github.com/users/mbudiu-vmw/following{/other_user}","gists_url":"https://api.github.com/users/mbudiu-vmw/gists{/gist_id}","starred_url":"https://api.github.com/users/mbudiu-vmw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbudiu-vmw/subscriptions","organizations_url":"https://api.github.com/users/mbudiu-vmw/orgs","repos_url":"https://api.github.com/users/mbudiu-vmw/repos","events_url":"https://api.github.com/users/mbudiu-vmw/events{/privacy}","received_events_url":"https://api.github.com/users/mbudiu-vmw/received_events","type":"User","site_admin":false},"assignees":[{"login":"mbudiu-vmw","id":19397042,"avatar_url":"https://avatars1.githubusercontent.com/u/19397042?v=4","gravatar_id":"","url":"https://api.github.com/users/mbudiu-vmw","html_url":"https://github.com/mbudiu-vmw","followers_url":"https://api.github.com/users/mbudiu-vmw/followers","following_url":"https://api.github.com/users/mbudiu-vmw/following{/other_user}","gists_url":"https://api.github.com/users/mbudiu-vmw/gists{/gist_id}","starred_url":"https://api.github.com/users/mbudiu-vmw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbudiu-vmw/subscriptions","organizations_url":"https://api.github.com/users/mbudiu-vmw/orgs","repos_url":"https://api.github.com/users/mbudiu-vmw/repos","events_url":"https://api.github.com/users/mbudiu-vmw/events{/privacy}","received_events_url":"https://api.github.com/users/mbudiu-vmw/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-08-03T20:19:31Z","updated_at":"2017-08-30T16:55:51Z","closed_at":"2017-08-30T16:51:02Z","author_association":"CONTRIBUTOR","body":"Following program triggers a bug in the `P4::Inline` pass in p4test midend.\r\n\r\n```\r\n#include <core.p4>\r\n\r\n// Architecture\r\nparser P<H>(packet_in pkt, out H hdr);\r\ncontrol C();\r\npackage S<H>(P<H> p, C c);\r\n\r\n// User Program\r\nheader data_h {\r\n    bit<32> da;\r\n}\r\n\r\nstruct headers_t {\r\n    data_h data;\r\n}\r\n\r\nparser MyP2(packet_in pkt, out headers_t hdr) {\r\n    state start {\r\n        transition reject;\r\n    }\r\n}\r\n\r\nparser MyP1(packet_in pkt, out headers_t hdr) {\r\n    MyP2() subp;\r\n    state start {\r\n        subp.apply(pkt, hdr);\r\n        transition accept;\r\n    }\r\n}\r\n\r\ncontrol MyC1() {\r\n  apply {\r\n  }\r\n}\r\n\r\nS(MyP1(), MyC1()) main;\r\n```\r\n\r\n```\r\n/Users/hanwang/p4-tests/bug.p4(25): warning: accept state in parser MyP2 is unreachable\r\nparser MyP2(packet_in pkt, out headers_t hdr) {\r\n       ^^^^\r\n/Users/hanwang/p4-tests/bug.p4(27): error: Could not find declaration for MyP2_reject\r\n        transition reject;\r\n                   ^^^^^^\r\n```"},"comment":{"url":"https://api.github.com/repos/p4lang/p4c/issues/comments/326053123","html_url":"https://github.com/p4lang/p4c/issues/823#issuecomment-326053123","issue_url":"https://api.github.com/repos/p4lang/p4c/issues/823","id":326053123,"user":{"login":"hanw","id":125978,"avatar_url":"https://avatars1.githubusercontent.com/u/125978?v=4","gravatar_id":"","url":"https://api.github.com/users/hanw","html_url":"https://github.com/hanw","followers_url":"https://api.github.com/users/hanw/followers","following_url":"https://api.github.com/users/hanw/following{/other_user}","gists_url":"https://api.github.com/users/hanw/gists{/gist_id}","starred_url":"https://api.github.com/users/hanw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanw/subscriptions","organizations_url":"https://api.github.com/users/hanw/orgs","repos_url":"https://api.github.com/users/hanw/repos","events_url":"https://api.github.com/users/hanw/events{/privacy}","received_events_url":"https://api.github.com/users/hanw/received_events","type":"User","site_admin":false},"created_at":"2017-08-30T16:55:51Z","updated_at":"2017-08-30T16:55:51Z","author_association":"CONTRIBUTOR","body":"Confirm fixed, thanks!"}}
{"actor":{"display_login":"hanw"}}