Closed
Description
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:
$ RUST_BACKTRACE=1 cargo build ∞
Compiling x86 v0.9.0 (file:///home/tommy/dev/rust-x86)
error: 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)
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_errors/lib.rs:423
stack backtrace:
1: 0x7f7f8ff286bc - std::sys::imp::backtrace::tracing::imp::write::h9c41d2f69e5caabf
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
2: 0x7f7f8ff36afe - std::panicking::default_hook::{{closure}}::hcc803c8663cda123
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:351
3: 0x7f7f8ff366a3 - std::panicking::default_hook::hd5bda4e453dfb4be
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:361
4: 0x7f7f8ff36f9b - std::panicking::rust_panic_with_hook::hffbc74969c7b5d87
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:555
5: 0x7f7f8854fa37 - std::panicking::begin_panic::he43dc5d9a599d346
6: 0x7f7f88565039 - rustc_errors::Handler::bug::h7088c6afc4a008fb
7: 0x7f7f8d28090a - rustc::session::opt_span_bug_fmt::{{closure}}::hfd034971cdf18ea9
8: 0x7f7f8d2803c5 - rustc::session::opt_span_bug_fmt::hc2cac313cb6d0020
9: 0x7f7f8d280022 - rustc::session::bug_fmt::he01375c3004c5cfe
10: 0x7f7f8f68001c - rustc_trans::mir::rvalue::<impl rustc_trans::mir::MirContext<'a, 'tcx>>::trans_rvalue::h7dc15384ecc85210
11: 0x7f7f8f66bb8f - rustc_trans::mir::block::<impl rustc_trans::mir::MirContext<'a, 'tcx>>::trans_block::h31596f784d651219
12: 0x7f7f8f669448 - rustc_trans::mir::trans_mir::h7e5fc59940d6977e
13: 0x7f7f8f68a98b - rustc_trans::trans_item::TransItem::define::h929f421e720c71df
14: 0x7f7f8f60b166 - rustc_trans::base::trans_crate::h496d157cb52a4b02
15: 0x7f7f902f00b0 - rustc_driver::driver::phase_4_translate_to_llvm::h106eb073675c3bee
16: 0x7f7f902c1e22 - rustc_driver::driver::compile_input::{{closure}}::heec508e3b0737586
17: 0x7f7f902e3541 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::haa13372f770e9055
18: 0x7f7f90241319 - rustc::ty::context::TyCtxt::create_and_enter::h6acd1d75709e85e8
19: 0x7f7f902bfdd0 - rustc_driver::driver::compile_input::h44853ffed84a12cb
20: 0x7f7f90305034 - rustc_driver::run_compiler::hdc4bb0fcf7d0917a
21: 0x7f7f90209c5b - std::panicking::try::do_call::h84a15e0d2b943318
22: 0x7f7f8ff3fdda - __rust_maybe_catch_panic
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
23: 0x7f7f902339a2 - <F as alloc::boxed::FnBox<A>>::call_box::h61c78220cad685ea
24: 0x7f7f8ff35954 - std::sys::imp::thread::Thread::new::thread_start::h76badbf9b0ecaf58
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/liballoc/boxed.rs:615
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys_common/thread.rs:21
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/thread.rs:84
25: 0x7f7f87cfa453 - start_thread
26: 0x7f7f8fbf97de - __GI___clone
27: 0x0 - <unknown>
error: Could not compile `x86`.
To learn more, run the command again with --verbose.
This may be related to #38735, but looking at the code, however there is no "m"
constraint anywhere in the SegmentSelector
.
$ rustc --version
rustc 1.16.0-nightly (bf6d7b665 2017-01-15)
$ git rev-parse --short HEAD # SHA-1 of the x86 crate
bb86b20
If I can help with any more details please let me know.