Skip to content

ICE with --crate-type staticlib: compiler/rustc_codegen_llvm/src/intrinsic.rs:306:18: unknown intrinsic 'rustc_peek' #86720

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
chengniansun opened this issue Jun 29, 2021 · 0 comments
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@chengniansun
Copy link

Code

#![feature(core_intrinsics)]
use std::intrinsics::rustc_peek;
#[no_mangle]
fn foo() -> i32 {
    let x = 0;
    rustc_peek(x)
}

Meta

rustc --version --verbose:

rustc 1.55.0-nightly (a435b49e8 2021-06-28)
binary: rustc
commit-hash: a435b49e86d16e98dcc6595dd471f95e823f41aa
commit-date: 2021-06-28
host: x86_64-unknown-linux-gnu
release: 1.55.0-nightly
LLVM version: 12.0.1

Error output

error: internal compiler error: compiler/rustc_codegen_llvm/src/intrinsic.rs:306:18: unknown intrinsic 'rustc_peek'

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1007:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.55.0-nightly (a435b49e8 2021-06-28) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type staticlib

query stack during panic:
end of query stack
error: aborting due to previous error
Backtrace

error: internal compiler error: compiler/rustc_codegen_llvm/src/intrinsic.rs:306:18: unknown intrinsic 'rustc_peek'

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1007:9
stack backtrace:
   0: std::panicking::begin_panic
   1: std::panic::panic_any
   2: rustc_errors::HandlerInner::bug
   3: rustc_errors::Handler::bug
   4: rustc_middle::ty::context::tls::with_opt
   5: rustc_middle::util::bug::opt_span_bug_fmt
   6: rustc_middle::util::bug::bug_fmt
   7: rustc_codegen_llvm::intrinsic::<impl rustc_codegen_ssa::traits::intrinsic::IntrinsicCallMethods for rustc_codegen_llvm::builder::Builder>::codegen_intrinsic_call
   8: rustc_codegen_ssa::mir::intrinsic::<impl rustc_codegen_ssa::mir::FunctionCx<Bx>>::codegen_intrinsic_call
   9: rustc_codegen_ssa::mir::block::<impl rustc_codegen_ssa::mir::FunctionCx<Bx>>::codegen_terminator
  10: rustc_codegen_ssa::mir::codegen_mir
  11: rustc_codegen_ssa::base::codegen_instance
  12: <rustc_middle::mir::mono::MonoItem as rustc_codegen_ssa::mono_item::MonoItemExt>::define
  13: rustc_codegen_llvm::base::compile_codegen_unit::module_codegen
  14: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  15: rustc_codegen_llvm::base::compile_codegen_unit
  16: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  17: rustc_interface::passes::QueryContext::enter
  18: rustc_interface::queries::Queries::ongoing_codegen
  19: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  20: rustc_span::with_source_map
  21: rustc_interface::interface::create_compiler_and_run
  22: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.55.0-nightly (a435b49e8 2021-06-28) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type staticlib

query stack during panic:
end of query stack
error: aborting due to previous error

@chengniansun chengniansun added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 29, 2021
fanninpm added a commit to fanninpm/glacier that referenced this issue Jul 4, 2021
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Jul 6, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants