{"action":"created","issue":{"url":"https://api.github.com/repos/tgingold/ghdl/issues/216","repository_url":"https://api.github.com/repos/tgingold/ghdl","labels_url":"https://api.github.com/repos/tgingold/ghdl/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/tgingold/ghdl/issues/216/comments","events_url":"https://api.github.com/repos/tgingold/ghdl/issues/216/events","html_url":"https://github.com/tgingold/ghdl/issues/216","id":194293229,"number":216,"title":"Error: choise is not locally static","user":{"login":"ljjterma","id":24311078,"avatar_url":"https://avatars.githubusercontent.com/u/24311078?v=3","gravatar_id":"","url":"https://api.github.com/users/ljjterma","html_url":"https://github.com/ljjterma","followers_url":"https://api.github.com/users/ljjterma/followers","following_url":"https://api.github.com/users/ljjterma/following{/other_user}","gists_url":"https://api.github.com/users/ljjterma/gists{/gist_id}","starred_url":"https://api.github.com/users/ljjterma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljjterma/subscriptions","organizations_url":"https://api.github.com/users/ljjterma/orgs","repos_url":"https://api.github.com/users/ljjterma/repos","events_url":"https://api.github.com/users/ljjterma/events{/privacy}","received_events_url":"https://api.github.com/users/ljjterma/received_events","type":"User","site_admin":false},"labels":[{"id":288528271,"url":"https://api.github.com/repos/tgingold/ghdl/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-08T10:02:44Z","updated_at":"2016-12-10T08:40:42Z","closed_at":null,"body":"The following code:\r\n\r\n```VHDL\r\n\r\n\r\nENTITY test IS\r\nEND ENTITY test;\r\n\r\nARCHITECTURE rtl OF test IS\r\n\r\n  TYPE test_type_t IS (\r\n    TEST_1,\r\n    TEST_2);\r\n\r\n  TYPE test_type_value_t IS ARRAY (test_type_t) OF natural;\r\n\r\n  CONSTANT C_TEST_TYPE_VALUE : test_type_value_t := (\r\n    TEST_1 => 0,\r\n    TEST_2 => 1);\r\n\r\n  CONSTANT C_TEST_TYPE_TEST_1 : natural := C_TEST_TYPE_VALUE(TEST_1);\r\n  CONSTANT C_TEST_TYPE_TEST_2 : natural := C_TEST_TYPE_VALUE(TEST_2);\r\n\r\n  FUNCTION get_priority (\r\n    arg : natural)\r\n    RETURN natural IS\r\n    VARIABLE result_v : natural;\r\n  BEGIN\r\n    CASE arg IS\r\n      WHEN C_TEST_TYPE_TEST_1 =>\r\n        result_v := 3;\r\n      WHEN C_TEST_TYPE_TEST_2 =>\r\n        result_v := 0;\r\n      WHEN OTHERS =>\r\n        REPORT \"Unknown Sector Type\"\r\n          SEVERITY error;\r\n        result_v := 4;\r\n    END CASE;\r\n    RETURN result_v;\r\n  END FUNCTION get_priority;\r\n\r\nBEGIN\r\n\r\nEND ARCHITECTURE rtl;\r\n\r\n```\r\n\r\nGenerates the error: choise is not locally static\r\n\r\nIt works fine in Questasim, Vivado and Precision "},"comment":{"url":"https://api.github.com/repos/tgingold/ghdl/issues/comments/266190287","html_url":"https://github.com/tgingold/ghdl/issues/216#issuecomment-266190287","issue_url":"https://api.github.com/repos/tgingold/ghdl/issues/216","id":266190287,"user":{"login":"ljjterma","id":24311078,"avatar_url":"https://avatars.githubusercontent.com/u/24311078?v=3","gravatar_id":"","url":"https://api.github.com/users/ljjterma","html_url":"https://github.com/ljjterma","followers_url":"https://api.github.com/users/ljjterma/followers","following_url":"https://api.github.com/users/ljjterma/following{/other_user}","gists_url":"https://api.github.com/users/ljjterma/gists{/gist_id}","starred_url":"https://api.github.com/users/ljjterma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljjterma/subscriptions","organizations_url":"https://api.github.com/users/ljjterma/orgs","repos_url":"https://api.github.com/users/ljjterma/repos","events_url":"https://api.github.com/users/ljjterma/events{/privacy}","received_events_url":"https://api.github.com/users/ljjterma/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T08:40:42Z","updated_at":"2016-12-10T08:40:42Z","body":"I am using 2008 when using ghdl. My production code use 93 dialect, but my test benches are mainly 2008 . \r\n\r\nI do not have a huge list of issues. As of now, i have stoppet when i found a problem. \r\n\r\nMy experience is that it is a huge benifit to Unit test the code (http://libre.adacore.com/tools/aunit/) . If i were to Fix the issue, i will add Unit tests. I plan to put them in ghdl/src/test. \r\n\r\nBest regards\r\nLars"}}
{"actor":{"display_login":"ljjterma"}}