{"action":"opened","issue":{"url":"https://api.github.com/repos/wiremod/wire/issues/1625","repository_url":"https://api.github.com/repos/wiremod/wire","labels_url":"https://api.github.com/repos/wiremod/wire/issues/1625/labels{/name}","comments_url":"https://api.github.com/repos/wiremod/wire/issues/1625/comments","events_url":"https://api.github.com/repos/wiremod/wire/issues/1625/events","html_url":"https://github.com/wiremod/wire/issues/1625","id":310235755,"number":1625,"title":"HL-ZASM internal error - * operand not resolved properly","user":{"login":"immibis","id":507686,"avatar_url":"https://avatars1.githubusercontent.com/u/507686?v=4","gravatar_id":"","url":"https://api.github.com/users/immibis","html_url":"https://github.com/immibis","followers_url":"https://api.github.com/users/immibis/followers","following_url":"https://api.github.com/users/immibis/following{/other_user}","gists_url":"https://api.github.com/users/immibis/gists{/gist_id}","starred_url":"https://api.github.com/users/immibis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/immibis/subscriptions","organizations_url":"https://api.github.com/users/immibis/orgs","repos_url":"https://api.github.com/users/immibis/repos","events_url":"https://api.github.com/users/immibis/events{/privacy}","received_events_url":"https://api.github.com/users/immibis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-31T12:01:11Z","updated_at":"2018-03-31T12:01:11Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"    #pragma set OutputResolveListing true\r\n    global_label: db 1\r\n    void func()\r\n    {\r\n        float localvar = *global_label;\r\n    }\r\n\r\nThis fails to compile because of `*global_label`. Expected behaviour is that the compiler emits code to load from the address of global_label into localvar; actual behaviour is that it somehow fails to resolve the label and ends up with an unexpected `nil` in the expression tree.\r\n\r\nNote - due to a different bug, if you've had any previous ZCPU error in the current play session, that will get displayed instead of the internal error.\r\n\r\nI modified my copy to print ??nil?? at the point where it otherwise tries to dereference nil - here's the OutputResolveListing:\r\n\r\n    === HL-ZASM High Level Assembly Compiler Output ==\r\n    global_label:\r\n         0 db 1\r\n    func:\r\n    // func()\r\n         1 enter 1\r\n    __1:\r\n         4 sstack EBP:-1,#??nil??\r\n    __0:\r\n         9 leave \r\n        10 ret \r\n    ==================================================\r\n\r\nNot expecting this fixed any time soon unless I do it myself :P\r\n\r\nWorkaround: instead of `global_label: db 1` use `float global_label = 1;`"}}
{"actor":{"display_login":"immibis"}}