alexcrichton transferred Issue #732:
Compile
// run-pass // aux-build:xcrate-reachable.rs #![feature(generator_trait)] extern crate xcrate_reachable as foo; use std::ops::Generator; use std::pin::Pin; fn main() { Pin::new(&mut foo::foo()).resume(); }using rustc_codegen_cranelift with
opt_level=best
and you get:---- [run-pass] run-pass/generator/xcrate-reachable.rs stdout ---- error: test compilation failed although it shouldn't! status: exit code: 101 command: "/home/bjorn/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc" "/home/bjorn/Documenten/rustc_codegen_cranelift/rust/src/test/run-pass/generator/xcrate-reachable.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/home/bjorn/Documenten/rustc_codegen_cranelift/rust/build/x86_64-unknown-linux-gnu/test/run-pass/generator/xcrate-reachable/a" "-Crpath" "-O" "-Zunstable-options" "-Zcodegen-backend=/home/bjorn/Documenten/rustc_codegen_cranelift/rust/../target/debug/librustc_codegen_cranelift.so" "--sysroot" "/home/bjorn/Documenten/rustc_codegen_cranelift/rust/../build_sysroot/sysroot" "-Cpanic=abort" "-Lnative=/home/bjorn/Documenten/rustc_codegen_cranelift/rust/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/home/bjorn/Documenten/rustc_codegen_cranelift/rust/build/x86_64-unknown-linux-gnu/test/run-pass/generator/xcrate-reachable/auxiliary" stdout: ------------------------------------------ Instance { def: Item(DefId(9/1:10 ~ xcrate_reachable[8787]::foo[0]::{{closure}}[0])), substs: [(), u32, {()}] } _ZN16xcrate_reachable3foo28_$u7b$$u7b$closure$u7d$$u7d$17he526fe6105ca50ffE ------------------------------------------ stderr: ------------------------------------------ thread 'rustc' panicked at 'assertion failed: !self.opcode().is_branch()', /home/bjorn/.cargo/git/checkouts/cranelift-af8713b52459e6cd/cadf244/cranelift-codegen/src/ir/instructions.rs:255:17 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39 1: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:71 2: std::panicking::default_hook::{{closure}} at src/libstd/sys_common/backtrace.rs:59 at src/libstd/panicking.rs:197 3: std::panicking::default_hook at src/libstd/panicking.rs:211 4: rustc::util::common::panic_hook 5: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:478 6: std::panicking::begin_panic at /rustc/474e7a6486758ea6fc761893b1a49cd9076fb0ab/src/libstd/panicking.rs:408 7: cranelift_codegen::licm::do_licm at /home/bjorn/.cargo/git/checkouts/cranelift-af8713b52459e6cd/cadf244/cranelift-codegen/src/ir/instructions.rs:255 at /home/bjorn/.cargo/git/checkouts/cranelift-af8713b52459e6cd/cadf244/cranelift-codegen/src/licm.rs:140 at /home/bjorn/.cargo/git/checkouts/cranelift-af8713b52459e6cd/cadf244/cranelift-codegen/src/licm.rs:89 at /home/bjorn/.cargo/git/checkouts/cranelift-af8713b52459e6cd/cadf244/cranelift-codegen/src/licm.rs:41 8: cranelift_codegen::context::Context::compile at /home/bjorn/.cargo/git/checkouts/cranelift-af8713b52459e6cd/cadf244/cranelift-codegen/src/context.rs:286 at /home/bjorn/.cargo/git/checkouts/cranelift-af8713b52459e6cd/cadf244/cranelift-codegen/src/context.rs:136 9: cranelift_module::module::Module<B>::define_function at /home/bjorn/.cargo/git/checkouts/cranelift-af8713b52459e6cd/cadf244/cranelift-module/src/module.rs:517 10: rustc_codegen_cranelift::base::trans_fn at src/base.rs:202 11: rustc_codegen_cranelift::base::trans_mono_item at src/base.rs:46 12: rustc_codegen_cranelift::codegen_mono_items::{{closure}}::{{closure}} at src/lib.rs:473 13: rustc_codegen_cranelift::unimpl::try_unimpl::{{closure}} at src/unimpl.rs:28 14: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once at /rustc/474e7a6486758ea6fc761893b1a49cd9076fb0ab/src/libstd/panic.rs:309 15: std::panicking::try::do_call at /rustc/474e7a6486758ea6fc761893b1a49cd9076fb0ab/src/libstd/panicking.rs:293 16: __rust_maybe_catch_panic at src/libpanic_unwind/lib.rs:87 17: std::panicking::try at /rustc/474e7a6486758ea6fc761893b1a49cd9076fb0ab/src/libstd/panicking.rs:272 18: std::panic::catch_unwind at /rustc/474e7a6486758ea6fc761893b1a49cd9076fb0ab/src/libstd/panic.rs:388 19: rustc_codegen_cranelift::unimpl::try_unimpl at src/unimpl.rs:28 20: rustc_codegen_cranelift::codegen_mono_items::{{closure}} at src/lib.rs:471 21: rustc_codegen_cranelift::time at src/lib.rs:484 22: rustc_codegen_cranelift::codegen_mono_items at src/lib.rs:469 23: rustc_codegen_cranelift::codegen_cgus at src/lib.rs:456 24: <rustc_codegen_cranelift::CraneliftCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate at src/lib.rs:318 25: rustc::util::common::time 26: rustc_interface::passes::start_codegen 27: rustc::ty::context::tls::enter_global 28: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}} 29: rustc_interface::passes::create_global_ctxt::{{closure}} 30: rustc_interface::passes::BoxedGlobalCtxt::enter 31: rustc_interface::queries::Query<T>::compute 32: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::ongoing_codegen 33: rustc_interface::interface::run_compiler_in_existing_thread_pool 34: std::thread::local::LocalKey<T>::with 35: scoped_tls::ScopedKey<T>::set 36: syntax::with_globals query stack during panic: end of query stack error: internal compiler error: unexpected panic 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: rustc 1.35.0-nightly (474e7a648 2019-04-07) running on x86_64-unknown-linux-gnu note: compiler flags: -Z threads=1 -Z ui-testing -Z unstable-options -Z codegen-backend=/home/bjorn/Documenten/rustc_codegen_cranelift/rust/../target/debug/librustc_codegen_cranelift.so -C rpath -C panic=abort
Last updated: Nov 22 2024 at 16:03 UTC