{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/39083","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/39083/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/39083/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/39083/events","html_url":"https://github.com/rust-lang/rust/issues/39083","id":200891808,"number":39083,"title":"Rust nightly internal compiler error in x86 crate","user":{"login":"tgummerer","id":191004,"avatar_url":"https://avatars.githubusercontent.com/u/191004?v=3","gravatar_id":"","url":"https://api.github.com/users/tgummerer","html_url":"https://github.com/tgummerer","followers_url":"https://api.github.com/users/tgummerer/followers","following_url":"https://api.github.com/users/tgummerer/following{/other_user}","gists_url":"https://api.github.com/users/tgummerer/gists{/gist_id}","starred_url":"https://api.github.com/users/tgummerer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgummerer/subscriptions","organizations_url":"https://api.github.com/users/tgummerer/orgs","repos_url":"https://api.github.com/users/tgummerer/repos","events_url":"https://api.github.com/users/tgummerer/events{/privacy}","received_events_url":"https://api.github.com/users/tgummerer/received_events","type":"User","site_admin":false},"labels":[{"id":108333,"url":"https://api.github.com/repos/rust-lang/rust/labels/A-LLVM","name":"A-LLVM","color":"d7e102","default":false},{"id":147085028,"url":"https://api.github.com/repos/rust-lang/rust/labels/regression-from-stable-to-nightly","name":"regression-from-stable-to-nightly","color":"FF309F","default":false},{"id":211668100,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-compiler","name":"T-compiler","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-15T20:22:34Z","updated_at":"2017-01-16T18:38:52Z","closed_at":null,"body":"I've been trying to compile the https://github.com/gz/rust-x86 crate with the latest nightly of rust, but have been getting the following internal compiler error:\r\n\r\n```\r\n$ RUST_BACKTRACE=1 cargo build                                          ∞\r\n   Compiling x86 v0.9.0 (file:///home/tommy/dev/rust-x86)\r\nerror: internal compiler error: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_trans/mir/operand.rs:83: not immediate: OperandRef(Ref((%\"shared::segmentation::SegmentSelector\"*:  %_4 = alloca %\"shared::segmentation::SegmentSelector\")) @ shared::segmentation::SegmentSelector)\r\n\r\nnote: the compiler unexpectedly panicked. this is a bug.\r\n\r\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports\r\n\r\nnote: run with `RUST_BACKTRACE=1` for a backtrace\r\n\r\nthread 'rustc' panicked at 'Box<Any>', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_errors/lib.rs:423\r\nstack backtrace:\r\n   1:     0x7f7f8ff286bc - std::sys::imp::backtrace::tracing::imp::write::h9c41d2f69e5caabf\r\n                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42\r\n   2:     0x7f7f8ff36afe - std::panicking::default_hook::{{closure}}::hcc803c8663cda123\r\n                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:351\r\n   3:     0x7f7f8ff366a3 - std::panicking::default_hook::hd5bda4e453dfb4be\r\n                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:361\r\n   4:     0x7f7f8ff36f9b - std::panicking::rust_panic_with_hook::hffbc74969c7b5d87\r\n                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:555\r\n   5:     0x7f7f8854fa37 - std::panicking::begin_panic::he43dc5d9a599d346\r\n   6:     0x7f7f88565039 - rustc_errors::Handler::bug::h7088c6afc4a008fb\r\n   7:     0x7f7f8d28090a - rustc::session::opt_span_bug_fmt::{{closure}}::hfd034971cdf18ea9\r\n   8:     0x7f7f8d2803c5 - rustc::session::opt_span_bug_fmt::hc2cac313cb6d0020\r\n   9:     0x7f7f8d280022 - rustc::session::bug_fmt::he01375c3004c5cfe\r\n  10:     0x7f7f8f68001c - rustc_trans::mir::rvalue::<impl rustc_trans::mir::MirContext<'a, 'tcx>>::trans_rvalue::h7dc15384ecc85210\r\n  11:     0x7f7f8f66bb8f - rustc_trans::mir::block::<impl rustc_trans::mir::MirContext<'a, 'tcx>>::trans_block::h31596f784d651219\r\n  12:     0x7f7f8f669448 - rustc_trans::mir::trans_mir::h7e5fc59940d6977e\r\n  13:     0x7f7f8f68a98b - rustc_trans::trans_item::TransItem::define::h929f421e720c71df\r\n  14:     0x7f7f8f60b166 - rustc_trans::base::trans_crate::h496d157cb52a4b02\r\n  15:     0x7f7f902f00b0 - rustc_driver::driver::phase_4_translate_to_llvm::h106eb073675c3bee\r\n  16:     0x7f7f902c1e22 - rustc_driver::driver::compile_input::{{closure}}::heec508e3b0737586\r\n  17:     0x7f7f902e3541 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::haa13372f770e9055\r\n  18:     0x7f7f90241319 - rustc::ty::context::TyCtxt::create_and_enter::h6acd1d75709e85e8\r\n  19:     0x7f7f902bfdd0 - rustc_driver::driver::compile_input::h44853ffed84a12cb\r\n  20:     0x7f7f90305034 - rustc_driver::run_compiler::hdc4bb0fcf7d0917a\r\n  21:     0x7f7f90209c5b - std::panicking::try::do_call::h84a15e0d2b943318\r\n  22:     0x7f7f8ff3fdda - __rust_maybe_catch_panic\r\n                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98\r\n  23:     0x7f7f902339a2 - <F as alloc::boxed::FnBox<A>>::call_box::h61c78220cad685ea\r\n  24:     0x7f7f8ff35954 - std::sys::imp::thread::Thread::new::thread_start::h76badbf9b0ecaf58\r\n                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/liballoc/boxed.rs:615\r\n                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys_common/thread.rs:21\r\n                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/thread.rs:84\r\n  25:     0x7f7f87cfa453 - start_thread\r\n  26:     0x7f7f8fbf97de - __GI___clone\r\n  27:                0x0 - <unknown>\r\n\r\nerror: Could not compile `x86`.\r\n\r\nTo learn more, run the command again with --verbose.\r\n```\r\n\r\nThis may be related to #38735, but looking at the code, however there is no `\"m\"` constraint anywhere in the `SegmentSelector`.\r\n\r\n```\r\n$ rustc --version\r\nrustc 1.16.0-nightly (bf6d7b665 2017-01-15)\r\n$ git rev-parse --short HEAD  # SHA-1 of the x86 crate\r\nbb86b20\r\n```\r\n\r\nIf I can help with any more details please let me know."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/272935193","html_url":"https://github.com/rust-lang/rust/issues/39083#issuecomment-272935193","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/39083","id":272935193,"user":{"login":"nagisa","id":679122,"avatar_url":"https://avatars.githubusercontent.com/u/679122?v=3","gravatar_id":"","url":"https://api.github.com/users/nagisa","html_url":"https://github.com/nagisa","followers_url":"https://api.github.com/users/nagisa/followers","following_url":"https://api.github.com/users/nagisa/following{/other_user}","gists_url":"https://api.github.com/users/nagisa/gists{/gist_id}","starred_url":"https://api.github.com/users/nagisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nagisa/subscriptions","organizations_url":"https://api.github.com/users/nagisa/orgs","repos_url":"https://api.github.com/users/nagisa/repos","events_url":"https://api.github.com/users/nagisa/events{/privacy}","received_events_url":"https://api.github.com/users/nagisa/received_events","type":"User","site_admin":false},"created_at":"2017-01-16T18:38:52Z","updated_at":"2017-01-16T18:38:52Z","body":"Minimal:\r\n\r\n```\r\n#![crate_type=\"rlib\"]\r\n#![feature(asm)]\r\n\r\n#[repr(C, packed)]\r\npub struct SegmentSelector {\r\n    flags: u16\r\n}\r\n\r\npub unsafe fn load_ss(sel: SegmentSelector) {\r\n    asm!(\"movw $0, %ss \" :: \"r\" (sel) : \"memory\");\r\n}\r\n```\r\n\r\nNot a regression. Structures are consciously not considered to be immediates anymore as of https://github.com/rust-lang/rust/pull/38906 and therefore cannot really be bound by the register bound. The structure should be converted to underlying value explicitly.\r\n\r\nThis is “just” an ICE.\r\n\r\nThat being said cc @dotdash @Mark-Simulacrum @eddyb."}}
{"actor":{"display_login":"nagisa"}}