{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/17233","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/17233/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/17233/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/17233/events","html_url":"https://github.com/rust-lang/rust/issues/17233","id":42696616,"number":17233,"title":"LLVM abort with indexing of byte string literal in static","user":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-dst","name":"A-dst","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-ICE","name":"I-ICE","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-09-13T14:04:36Z","updated_at":"2015-03-29T19:44:33Z","closed_at":null,"body":"```rust\r\n#![allow(dead_code)]\r\n\r\nconst X: &'static [u8] = b\"1\";\r\n\r\nstatic Y: u8 = X[0];\r\n\r\nfn main() {}\r\n```\r\n\r\n```\r\nrustc: /build/rust-git/src/rust/src/llvm/include/llvm/Support/Casting.h:237: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::GlobalVariable; Y = llvm::Value; typename llvm::cast_retty<X, Y*>::ret_type = llvm::GlobalVariable*]: Assertion `isa<X>(Val) && \"cast<Ty>() argument of incompatible type!\"' failed.\r\nAborted\r\nplaypen: application terminated with error code 134\r\n```\r\n\r\nChanging the `b\"1\"` to e.g. `&[1]` works fine."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/87462000","html_url":"https://github.com/rust-lang/rust/issues/17233#issuecomment-87462000","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/17233","id":87462000,"user":{"login":"JustAPerson","id":789308,"avatar_url":"https://avatars.githubusercontent.com/u/789308?v=3","gravatar_id":"","url":"https://api.github.com/users/JustAPerson","html_url":"https://github.com/JustAPerson","followers_url":"https://api.github.com/users/JustAPerson/followers","following_url":"https://api.github.com/users/JustAPerson/following{/other_user}","gists_url":"https://api.github.com/users/JustAPerson/gists{/gist_id}","starred_url":"https://api.github.com/users/JustAPerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustAPerson/subscriptions","organizations_url":"https://api.github.com/users/JustAPerson/orgs","repos_url":"https://api.github.com/users/JustAPerson/repos","events_url":"https://api.github.com/users/JustAPerson/events{/privacy}","received_events_url":"https://api.github.com/users/JustAPerson/received_events","type":"User","site_admin":false},"created_at":"2015-03-29T19:44:33Z","updated_at":"2015-03-29T19:44:33Z","body":"This works fine now.\r\n\r\nThis issue may be closed."}}