{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/16337","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/16337/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/16337/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/16337/events","html_url":"https://github.com/rust-lang/rust/issues/16337","id":39770816,"number":16337,"title":"Unknown inline asm constraints cause LLVM assertion failures","user":{"login":"main--","id":754850,"avatar_url":"https://avatars.githubusercontent.com/u/754850?v=3","gravatar_id":"","url":"https://api.github.com/users/main--","html_url":"https://github.com/main--","followers_url":"https://api.github.com/users/main--/followers","following_url":"https://api.github.com/users/main--/following{/other_user}","gists_url":"https://api.github.com/users/main--/gists{/gist_id}","starred_url":"https://api.github.com/users/main--/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/main--/subscriptions","organizations_url":"https://api.github.com/users/main--/orgs","repos_url":"https://api.github.com/users/main--/repos","events_url":"https://api.github.com/users/main--/events{/privacy}","received_events_url":"https://api.github.com/users/main--/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-inline-assembly","name":"A-inline-assembly","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-08-07T21:33:41Z","updated_at":"2016-02-02T19:39:52Z","closed_at":"2016-02-02T19:39:52Z","body":"```rust\r\n#![feature(asm)]\r\n\r\nfn main() {\r\n    let x = 42u;\r\n    unsafe { asm!(\"\" :: \"g\"(x)); }\r\n}\r\n```\r\n\r\n```\r\nrustc: /build/buildd/rust-nightly-201408070406~8fe73f1~trusty/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:6668: void llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite): Assertion `(OpInfo.ConstraintType == TargetLowering::C_RegisterClass || OpInfo.ConstraintType == TargetLowering::C_Register) && \"Unknown constraint type!\"' failed.\r\nAborted (core dumped)\r\n```\r\n\r\nThis is caused by **any** constraints that `rustc` can't handle (even something obviously invalid like `ö`). But [shouldn't](https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html#Simple-Constraints) `g` work?"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/178780937","html_url":"https://github.com/rust-lang/rust/issues/16337#issuecomment-178780937","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/16337","id":178780937,"user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T19:39:52Z","updated_at":"2016-02-02T19:39:52Z","body":"The inline asm docs explicitly link to the LLVM docs, and say that we use something \"like GCC\" but not the same as gcc."}}