Closed as not planned
Description
Code
#![crate_type = "staticlib"]
#![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.61.0-nightly (4b043faba 2022-02-24)
binary: rustc
commit-hash: 4b043faba34ccc053a4d0110634c323f6c03765e
commit-date: 2022-02-24
host: x86_64-unknown-linux-gnu
release: 1.61.0-nightly
LLVM version: 14.0.0
Error output
Backtrace
error: internal compiler error: compiler/rustc_codegen_llvm/src/intrinsic.rs:370:18: unknown intrinsic 'rustc_peek'
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1160:9
stack backtrace:
0: 0x7fd004afdd4c - std::backtrace_rs::backtrace::libunwind::trace::h853a1389f6e5e745
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7fd004afdd4c - std::backtrace_rs::backtrace::trace_unsynchronized::h141fba7f3343285a
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fd004afdd4c - std::sys_common::backtrace::_print_fmt::h3413d0b0d4b31c4c
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/sys_common/backtrace.rs:66:5
3: 0x7fd004afdd4c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbc867a15ccd0341f
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/sys_common/backtrace.rs:45:22
4: 0x7fd004b5d9fc - core::fmt::write::h35157148513e92bc
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/core/src/fmt/mod.rs:1190:17
5: 0x7fd004aede78 - std::io::Write::write_fmt::hc5517132c5cecddc
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/io/mod.rs:1657:15
6: 0x7fd004b01d27 - std::sys_common::backtrace::_print::hc5f683d445b22529
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/sys_common/backtrace.rs:48:5
7: 0x7fd004b01d27 - std::sys_common::backtrace::print::hd841ed3190824cc9
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/sys_common/backtrace.rs:35:9
8: 0x7fd004b01d27 - std::panicking::default_hook::{{closure}}::h9a0c56b9dbc35012
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/panicking.rs:295:22
9: 0x7fd004b019df - std::panicking::default_hook::hc46807a97c7de333
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/panicking.rs:314:9
10: 0x7fd0052930d1 - rustc_driver[442ed871d20551d1]::DEFAULT_HOOK::{closure#0}::{closure#0}
11: 0x7fd004b025f6 - std::panicking::rust_panic_with_hook::h1ad2fcf54bcf9bb5
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/panicking.rs:702:17
12: 0x7fd0062fcf11 - std[2a6da251afaa3124]::panicking::begin_panic::<rustc_errors[1b480dc045645b1a]::ExplicitBug>::{closure#0}
13: 0x7fd0062fce76 - std[2a6da251afaa3124]::sys_common::backtrace::__rust_end_short_backtrace::<std[2a6da251afaa3124]::panicking::begin_panic<rustc_errors[1b480dc045645b1a]::ExplicitBug>::{closure#0}, !>
14: 0x7fd00630337f - std[2a6da251afaa3124]::panicking::begin_panic::<rustc_errors[1b480dc045645b1a]::ExplicitBug>
15: 0x7fd0063104ad - std[2a6da251afaa3124]::panic::panic_any::<rustc_errors[1b480dc045645b1a]::ExplicitBug>
16: 0x7fd00630f737 - <rustc_errors[1b480dc045645b1a]::HandlerInner>::bug
17: 0x7fd00630f230 - <rustc_errors[1b480dc045645b1a]::Handler>::bug
18: 0x7fd0062667d9 - rustc_middle[cef953e2dc6653d0]::ty::context::tls::with_opt::<rustc_middle[cef953e2dc6653d0]::util::bug::opt_span_bug_fmt<rustc_span[cac29f2f15677c0e]::span_encoding::Span>::{closure#0}, ()>
19: 0x7fd006266a70 - rustc_middle[cef953e2dc6653d0]::util::bug::opt_span_bug_fmt::<rustc_span[cac29f2f15677c0e]::span_encoding::Span>
20: 0x7fd0062669e6 - rustc_middle[cef953e2dc6653d0]::util::bug::bug_fmt
21: 0x7fd0071342e0 - <rustc_codegen_llvm[fbf752d051d739ba]::builder::Builder as rustc_codegen_ssa[795ae6073e3d8cbc]::traits::intrinsic::IntrinsicCallMethods>::codegen_intrinsic_call
22: 0x7fd007145736 - <rustc_codegen_ssa[795ae6073e3d8cbc]::mir::FunctionCx<rustc_codegen_llvm[fbf752d051d739ba]::builder::Builder>>::codegen_intrinsic_call
23: 0x7fd0064b0d2c - rustc_codegen_ssa[795ae6073e3d8cbc]::mir::codegen_mir::<rustc_codegen_llvm[fbf752d051d739ba]::builder::Builder>
24: 0x7fd00646fb02 - rustc_codegen_llvm[fbf752d051d739ba]::base::compile_codegen_unit::module_codegen
25: 0x7fd0070f75f2 - rustc_codegen_llvm[fbf752d051d739ba]::base::compile_codegen_unit
26: 0x7fd0071201be - rustc_codegen_ssa[795ae6073e3d8cbc]::base::codegen_crate::<rustc_codegen_llvm[fbf752d051d739ba]::LlvmCodegenBackend>
27: 0x7fd0070e403a - <rustc_codegen_llvm[fbf752d051d739ba]::LlvmCodegenBackend as rustc_codegen_ssa[795ae6073e3d8cbc]::traits::backend::CodegenBackend>::codegen_crate
28: 0x7fd0070d3b67 - <rustc_session[94f6c5c92635dd6]::session::Session>::time::<alloc[712883fc59a62f7]::boxed::Box<dyn core[a2af605994515733]::any::Any>, rustc_interface[65caae14b4217ef3]::passes::start_codegen::{closure#0}>
29: 0x7fd0070bba46 - <rustc_interface[65caae14b4217ef3]::passes::QueryContext>::enter::<<rustc_interface[65caae14b4217ef3]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[a2af605994515733]::result::Result<alloc[712883fc59a62f7]::boxed::Box<dyn core[a2af605994515733]::any::Any>, rustc_errors[1b480dc045645b1a]::ErrorReported>>
30: 0x7fd0070b1edf - <rustc_interface[65caae14b4217ef3]::queries::Queries>::ongoing_codegen
31: 0x7fd007089fdd - <rustc_interface[65caae14b4217ef3]::interface::Compiler>::enter::<rustc_driver[442ed871d20551d1]::run_compiler::{closure#1}::{closure#2}, core[a2af605994515733]::result::Result<core[a2af605994515733]::option::Option<rustc_interface[65caae14b4217ef3]::queries::Linker>, rustc_errors[1b480dc045645b1a]::ErrorReported>>
32: 0x7fd00708c196 - rustc_span[cac29f2f15677c0e]::with_source_map::<core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>, rustc_interface[65caae14b4217ef3]::interface::create_compiler_and_run<core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>, rustc_driver[442ed871d20551d1]::run_compiler::{closure#1}>::{closure#1}>
33: 0x7fd0070899b1 - rustc_interface[65caae14b4217ef3]::interface::create_compiler_and_run::<core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>, rustc_driver[442ed871d20551d1]::run_compiler::{closure#1}>
34: 0x7fd007075372 - <scoped_tls[876471c7b20f8e0c]::ScopedKey<rustc_span[cac29f2f15677c0e]::SessionGlobals>>::set::<rustc_interface[65caae14b4217ef3]::interface::run_compiler<core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>, rustc_driver[442ed871d20551d1]::run_compiler::{closure#1}>::{closure#0}, core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>>
35: 0x7fd007074c2d - std[2a6da251afaa3124]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[65caae14b4217ef3]::util::run_in_thread_pool_with_globals<rustc_interface[65caae14b4217ef3]::interface::run_compiler<core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>, rustc_driver[442ed871d20551d1]::run_compiler::{closure#1}>::{closure#0}, core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>>::{closure#0}, core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>>
36: 0x7fd007073419 - <<std[2a6da251afaa3124]::thread::Builder>::spawn_unchecked_<rustc_interface[65caae14b4217ef3]::util::run_in_thread_pool_with_globals<rustc_interface[65caae14b4217ef3]::interface::run_compiler<core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>, rustc_driver[442ed871d20551d1]::run_compiler::{closure#1}>::{closure#0}, core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>>::{closure#0}, core[a2af605994515733]::result::Result<(), rustc_errors[1b480dc045645b1a]::ErrorReported>>::{closure#1} as core[a2af605994515733]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
37: 0x7fd004b0e183 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hbda7b2dd6cb05b7b
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/alloc/src/boxed.rs:1854:9
38: 0x7fd004b0e183 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4e7c4e55f1ee6074
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/alloc/src/boxed.rs:1854:9
39: 0x7fd004b0e183 - std::sys::unix::thread::Thread::new::thread_start::h272cda2d6cad9954
at /rustc/4b043faba34ccc053a4d0110634c323f6c03765e/library/std/src/sys/unix/thread.rs:108:17
40: 0x7fd004a13259 - start_thread
41: 0x7fd00492f5e3 - __GI___clone
42: 0x0 - <unknown>
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.61.0-nightly (4b043faba 2022-02-24) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
error: aborting due to previous error