Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ICE: Couldn't translate Aggregate { sized: true } as backend immediate #109992

Closed
matthiaskrgr opened this issue Apr 6, 2023 · 4 comments · Fixed by #110021
Closed

ICE: Couldn't translate Aggregate { sized: true } as backend immediate #109992

matthiaskrgr opened this issue Apr 6, 2023 · 4 comments · Fixed by #110021
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

fn test_fn_transmute_zst(x: ()) -> [(); 1] {
    id(unsafe { std::mem::transmute(x) })
}

fn id<T>(x: T) -> T {
    x
}

fn main() {
    let r = 3;

    assert_eq!(test_fn_transmute_zst(()), [()]);
}

Meta

rustc --version --verbose:

b2b676d886ded452125712a304c524c08360f916

Error output

requires debug assertions!
rustc treereduce.out -Zmir-opt-level=0

<output>
Backtrace

warning: unused variable: `r`
  --> treereduce.out:10:9
   |
10 |     let r = 3;
   |         ^ help: if this is intentional, prefix it with an underscore: `_r`
   |
   = note: `#[warn(unused_variables)]` on by default

error: internal compiler error: /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/rvalue.rs:892:22: Couldn't translate Aggregate { sized: true } as backend immediate

thread 'rustc' panicked at 'Box<dyn Any>', /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/lib.rs:1644:9
stack backtrace:
   0:     0x7f50b0b08b74 - std::backtrace_rs::backtrace::libunwind::trace::hb665cc1e15997bac
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f50b0b08b74 - std::backtrace_rs::backtrace::trace_unsynchronized::h055f8ddc726b8f7c
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f50b0b08b74 - std::sys_common::backtrace::_print_fmt::h999bfbccdb2f08c6
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f50b0b08b74 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h69192bf0ed9c5c99
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f50b0bb962b - core::fmt::write::h2dac34aae88eac3a
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/mod.rs:1254:17
   5:     0x7f50b0b4cc4f - std::io::Write::write_fmt::ha9250e813467be99
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/io/mod.rs:1698:15
   6:     0x7f50b0b08975 - std::sys_common::backtrace::_print::h7f5c2f1ca54d0413
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f50b0b08975 - std::sys_common::backtrace::print::h6c093bf114bc8569
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f50b0b33ef4 - std::panicking::default_hook::{{closure}}::hbab87a1d77c907c2
   9:     0x7f50b0b33b2d - std::panicking::default_hook::h888aa058ad9d0fac
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:288:9
  10:     0x7f50b3666b75 - <alloc[8685091c532fe695]::boxed::Box<dyn for<'a, 'b> core[56d2be079082b2f7]::ops::function::Fn<(&'a core[56d2be079082b2f7]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[56d2be079082b2f7]::marker::Send + core[56d2be079082b2f7]::marker::Sync> as core[56d2be079082b2f7]::ops::function::Fn<(&core[56d2be079082b2f7]::panic::panic_info::PanicInfo,)>>::call
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1990:9
  11:     0x7f50b3666b75 - rustc_driver_impl[53cfb4cfe592b1cc]::DEFAULT_HOOK::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:1199:17
  12:     0x7f50b0b346e1 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h40961c4fa974a79e
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1990:9
  13:     0x7f50b0b346e1 - std::panicking::rust_panic_with_hook::hf2bdefcf339fd31a
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:694:13
  14:     0x7f50b46a64b3 - std[86ab35e6a6527d40]::panicking::begin_panic::<rustc_errors[bf7ae9ae6b851a13]::ExplicitBug>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:610:9
  15:     0x7f50b46a0486 - std[86ab35e6a6527d40]::sys_common::backtrace::__rust_end_short_backtrace::<std[86ab35e6a6527d40]::panicking::begin_panic<rustc_errors[bf7ae9ae6b851a13]::ExplicitBug>::{closure#0}, !>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:150:18
  16:     0x7f50b47b9216 - std[86ab35e6a6527d40]::panicking::begin_panic::<rustc_errors[bf7ae9ae6b851a13]::ExplicitBug>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:609:12
  17:     0x7f50b4729ffa - std[86ab35e6a6527d40]::panic::panic_any::<rustc_errors[bf7ae9ae6b851a13]::ExplicitBug>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panic.rs:61:5
  18:     0x7f50b4729ffa - <rustc_errors[bf7ae9ae6b851a13]::HandlerInner>::bug::<&alloc[8685091c532fe695]::string::String>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/lib.rs:1644:9
  19:     0x7f50b4729ba0 - <rustc_errors[bf7ae9ae6b851a13]::Handler>::bug::<&alloc[8685091c532fe695]::string::String>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/lib.rs:1064:9
  20:     0x7f50b47a9d9e - rustc_middle[1621e1d9efb092ce]::util::bug::opt_span_bug_fmt::<rustc_span[5e1e12958345f30f]::span_encoding::Span>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/util/bug.rs:35:34
  21:     0x7f50b47a93d4 - rustc_middle[1621e1d9efb092ce]::ty::context::tls::with_opt::<rustc_middle[1621e1d9efb092ce]::util::bug::opt_span_bug_fmt<rustc_span[5e1e12958345f30f]::span_encoding::Span>::{closure#0}, !>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:154:36
  22:     0x7f50b47a936e - rustc_middle[1621e1d9efb092ce]::ty::context::tls::with_context_opt::<rustc_middle[1621e1d9efb092ce]::ty::context::tls::with_opt<rustc_middle[1621e1d9efb092ce]::util::bug::opt_span_bug_fmt<rustc_span[5e1e12958345f30f]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:100:18
  23:     0x7f50b47a9cd7 - rustc_middle[1621e1d9efb092ce]::ty::context::tls::with_opt::<rustc_middle[1621e1d9efb092ce]::util::bug::opt_span_bug_fmt<rustc_span[5e1e12958345f30f]::span_encoding::Span>::{closure#0}, !>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:154:5
  24:     0x7f50b47a9cd7 - rustc_middle[1621e1d9efb092ce]::util::bug::opt_span_bug_fmt::<rustc_span[5e1e12958345f30f]::span_encoding::Span>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/util/bug.rs:31:5
  25:     0x7f50b47a9c53 - rustc_middle[1621e1d9efb092ce]::util::bug::bug_fmt
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/util/bug.rs:15:5
  26:     0x7f50b32e0241 - <rustc_codegen_ssa[cb990c0ddf67acf7]::mir::FunctionCx<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder>>::value_kind
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/rvalue.rs:892:22
  27:     0x7f50b32e0396 - <rustc_codegen_ssa[cb990c0ddf67acf7]::mir::FunctionCx<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder>>::rvalue_creates_operand
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/rvalue.rs:843:24
  28:     0x7f50b31f7b62 - <rustc_codegen_ssa[cb990c0ddf67acf7]::mir::analyze::LocalAnalyzer<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder> as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::visit_assign
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/analyze.rs:183:21
  29:     0x7f50b31f7b62 - <rustc_codegen_ssa[cb990c0ddf67acf7]::mir::analyze::LocalAnalyzer<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder> as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::super_statement
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/mir/visit.rs:370:25
  30:     0x7f50b31f7b62 - <rustc_codegen_ssa[cb990c0ddf67acf7]::mir::analyze::LocalAnalyzer<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder> as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::visit_statement
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/mir/visit.rs:105:17
  31:     0x7f50b31f7b62 - <rustc_codegen_ssa[cb990c0ddf67acf7]::mir::analyze::LocalAnalyzer<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder> as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::super_basic_block_data
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/mir/visit.rs:299:21
  32:     0x7f50b31f7b62 - <rustc_codegen_ssa[cb990c0ddf67acf7]::mir::analyze::LocalAnalyzer<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder> as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::visit_basic_block_data
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/mir/visit.rs:90:17
  33:     0x7f50b31f7b62 - rustc_codegen_ssa[cb990c0ddf67acf7]::mir::analyze::non_ssa_locals::<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/analyze.rs:46:9
  34:     0x7f50b32c72bc - rustc_codegen_ssa[cb990c0ddf67acf7]::mir::codegen_mir::<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/mod.rs:224:25
  35:     0x7f50b3248d64 - rustc_codegen_ssa[cb990c0ddf67acf7]::base::codegen_instance::<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/base.rs:398:5
  36:     0x7f50b328ba75 - <rustc_middle[1621e1d9efb092ce]::mir::mono::MonoItem as rustc_codegen_ssa[cb990c0ddf67acf7]::mono_item::MonoItemExt>::define::<rustc_codegen_llvm[c562a0c5f00a438f]::builder::Builder>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mono_item.rs:91:17
  37:     0x7f50b315415e - rustc_codegen_llvm[c562a0c5f00a438f]::base::compile_codegen_unit::module_codegen
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/base.rs:95:17
  38:     0x7f50b3158a14 - <rustc_query_system[eeda195d38f2e6a0]::dep_graph::graph::DepGraph<rustc_middle[1621e1d9efb092ce]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[1621e1d9efb092ce]::ty::context::TyCtxt, rustc_span[5e1e12958345f30f]::symbol::Symbol, rustc_codegen_ssa[cb990c0ddf67acf7]::ModuleCodegen<rustc_codegen_llvm[c562a0c5f00a438f]::ModuleLlvm>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/dep_graph/graph.rs:275:22
  39:     0x7f50b3158a14 - rustc_codegen_llvm[c562a0c5f00a438f]::base::compile_codegen_unit
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/base.rs:64:37
  40:     0x7f50b3158a14 - <rustc_codegen_llvm[c562a0c5f00a438f]::LlvmCodegenBackend as rustc_codegen_ssa[cb990c0ddf67acf7]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/lib.rs:131:9
  41:     0x7f50b3248110 - rustc_codegen_ssa[cb990c0ddf67acf7]::base::codegen_crate::<rustc_codegen_llvm[c562a0c5f00a438f]::LlvmCodegenBackend>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/base.rs:733:34
  42:     0x7f50b315e407 - <rustc_codegen_llvm[c562a0c5f00a438f]::LlvmCodegenBackend as rustc_codegen_ssa[cb990c0ddf67acf7]::traits::backend::CodegenBackend>::codegen_crate
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/lib.rs:343:18
  43:     0x7f50b41b6462 - rustc_interface[a109d3959576535b]::passes::start_codegen::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:874:9
  44:     0x7f50b41b6462 - <rustc_data_structures[8a557029cfac743e]::profiling::VerboseTimingGuard>::run::<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_interface[a109d3959576535b]::passes::start_codegen::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/profiling.rs:752:9
  45:     0x7f50b41b6462 - <rustc_session[5da8902571af233a]::session::Session>::time::<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_interface[a109d3959576535b]::passes::start_codegen::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_session/src/utils.rs:11:50
  46:     0x7f50b41b6462 - rustc_interface[a109d3959576535b]::passes::start_codegen
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:873:19
  47:     0x7f50b4273a85 - <rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:264:20
  48:     0x7f50b4273a85 - <rustc_middle[1621e1d9efb092ce]::ty::context::GlobalCtxt>::enter::<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context.rs:559:37
  49:     0x7f50b4273a85 - rustc_middle[1621e1d9efb092ce]::ty::context::tls::enter_context::<<rustc_middle[1621e1d9efb092ce]::ty::context::GlobalCtxt>::enter<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:82:9
  50:     0x7f50b4273a85 - <std[86ab35e6a6527d40]::thread::local::LocalKey<core[56d2be079082b2f7]::cell::Cell<*const ()>>>::try_with::<rustc_middle[1621e1d9efb092ce]::ty::context::tls::enter_context<<rustc_middle[1621e1d9efb092ce]::ty::context::GlobalCtxt>::enter<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:252:16
  51:     0x7f50b4273a85 - <std[86ab35e6a6527d40]::thread::local::LocalKey<core[56d2be079082b2f7]::cell::Cell<*const ()>>>::with::<rustc_middle[1621e1d9efb092ce]::ty::context::tls::enter_context<<rustc_middle[1621e1d9efb092ce]::ty::context::GlobalCtxt>::enter<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:228:9
  52:     0x7f50b42b33ab - rustc_middle[1621e1d9efb092ce]::ty::context::tls::enter_context::<<rustc_middle[1621e1d9efb092ce]::ty::context::GlobalCtxt>::enter<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:79:5
  53:     0x7f50b42b33ab - <rustc_middle[1621e1d9efb092ce]::ty::context::GlobalCtxt>::enter::<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context.rs:559:9
  54:     0x7f50b42b33ab - <rustc_interface[a109d3959576535b]::queries::QueryResult<&rustc_middle[1621e1d9efb092ce]::ty::context::GlobalCtxt>>::enter::<core[56d2be079082b2f7]::result::Result<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, <rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:71:9
  55:     0x7f50b42b33ab - <rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:251:13
  56:     0x7f50b42b33ab - <rustc_interface[a109d3959576535b]::queries::Query<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>>>::compute::<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}>::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:45:41
  57:     0x7f50b42b33ab - <core[56d2be079082b2f7]::option::Option<core[56d2be079082b2f7]::result::Result<rustc_data_structures[8a557029cfac743e]::steal::Steal<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>>::get_or_insert_with::<<rustc_interface[a109d3959576535b]::queries::Query<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>>>::compute<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}>::{closure#0}::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/option.rs:1724:49
  58:     0x7f50b42b33ab - <rustc_interface[a109d3959576535b]::queries::Query<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>>>::compute::<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:45:17
  59:     0x7f50b42b33ab - <core[56d2be079082b2f7]::cell::RefMut<core[56d2be079082b2f7]::option::Option<core[56d2be079082b2f7]::result::Result<rustc_data_structures[8a557029cfac743e]::steal::Steal<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>>>::filter_map::<rustc_data_structures[8a557029cfac743e]::steal::Steal<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>>, <rustc_interface[a109d3959576535b]::queries::Query<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>>>::compute<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}>::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/cell.rs:1637:15
  60:     0x7f50b42b33ab - <rustc_interface[a109d3959576535b]::queries::Query<alloc[8685091c532fe695]::boxed::Box<dyn core[56d2be079082b2f7]::any::Any>>>::compute::<<rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:42:9
  61:     0x7f50b42b33ab - <rustc_interface[a109d3959576535b]::queries::Queries>::ongoing_codegen
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:250:9
  62:     0x7f50b36cd873 - rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}::{closure#2}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:397:13
  63:     0x7f50b36cd873 - <rustc_interface[a109d3959576535b]::interface::Compiler>::enter::<rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}::{closure#2}, core[56d2be079082b2f7]::result::Result<core[56d2be079082b2f7]::option::Option<rustc_interface[a109d3959576535b]::queries::Linker>, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:394:19
  64:     0x7f50b3667eab - rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:332:22
  65:     0x7f50b3667eab - rustc_interface[a109d3959576535b]::interface::run_compiler::<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/interface.rs:301:21
  66:     0x7f50b3667eab - rustc_span[5e1e12958345f30f]::set_source_map::<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_span/src/lib.rs:1040:5
  67:     0x7f50b3677832 - rustc_interface[a109d3959576535b]::interface::run_compiler::<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/interface.rs:295:13
  68:     0x7f50b3677832 - <scoped_tls[4c47fe243b885cb1]::ScopedKey<rustc_span[5e1e12958345f30f]::SessionGlobals>>::set::<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>
                               at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137:9
  69:     0x7f50b3677832 - rustc_span[5e1e12958345f30f]::create_session_globals_then::<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_span/src/lib.rs:120:5
  70:     0x7f50b3677832 - rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals::<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/util.rs:152:38
  71:     0x7f50b3677832 - std[86ab35e6a6527d40]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:134:18
  72:     0x7f50b367b6b1 - <std[86ab35e6a6527d40]::thread::Builder>::spawn_unchecked_::<rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/mod.rs:525:17
  73:     0x7f50b367b6b1 - <core[56d2be079082b2f7]::panic::unwind_safe::AssertUnwindSafe<<std[86ab35e6a6527d40]::thread::Builder>::spawn_unchecked_<rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0}> as core[56d2be079082b2f7]::ops::function::FnOnce<()>>::call_once
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panic/unwind_safe.rs:271:9
  74:     0x7f50b367b6b1 - std[86ab35e6a6527d40]::panicking::try::do_call::<core[56d2be079082b2f7]::panic::unwind_safe::AssertUnwindSafe<<std[86ab35e6a6527d40]::thread::Builder>::spawn_unchecked_<rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0}>, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:485:40
  75:     0x7f50b367b6b1 - std[86ab35e6a6527d40]::panicking::try::<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, core[56d2be079082b2f7]::panic::unwind_safe::AssertUnwindSafe<<std[86ab35e6a6527d40]::thread::Builder>::spawn_unchecked_<rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0}>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:449:19
  76:     0x7f50b367b6b1 - std[86ab35e6a6527d40]::panic::catch_unwind::<core[56d2be079082b2f7]::panic::unwind_safe::AssertUnwindSafe<<std[86ab35e6a6527d40]::thread::Builder>::spawn_unchecked_<rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0}>, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panic.rs:140:14
  77:     0x7f50b367b6b1 - <std[86ab35e6a6527d40]::thread::Builder>::spawn_unchecked_::<rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/mod.rs:524:30
  78:     0x7f50b367b6b1 - <<std[86ab35e6a6527d40]::thread::Builder>::spawn_unchecked_<rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals<rustc_interface[a109d3959576535b]::interface::run_compiler<core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1} as core[56d2be079082b2f7]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/ops/function.rs:250:5
  79:     0x7f50b0b381da - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h354d14dc16c7e009
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1976:9
  80:     0x7f50b0b381da - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6252c296bff6789e
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1976:9
  81:     0x7f50b0b0b035 - std::sys::unix::thread::Thread::new::thread_start::hc92da0325fb0a23e
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys/unix/thread.rs:108:17
  82:     0x7f50b0c9ebb5 - <unknown>
  83:     0x7f50b0d20d90 - <unknown>
  84:                0x0 - <unknown>

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.70.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: -Z mir-opt-level=0

query stack during panic:
end of query stack
error: aborting due to previous error; 1 warning emitted

@matthiaskrgr matthiaskrgr added 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. C-bug Category: This is a bug. requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way labels Apr 6, 2023
@Noratrieb
Copy link
Member

transmute, so cc @scottmcm

@scottmcm scottmcm self-assigned this Apr 6, 2023
@scottmcm
Copy link
Member

scottmcm commented Apr 6, 2023

Thanks for catching this! I'll make a fix.

@scottmcm
Copy link
Member

scottmcm commented Apr 6, 2023

@matthiaskrgr Which debug assertions do I need here? Is it this config?

[rust]
debug-assertions = true

@matthiaskrgr
Copy link
Member Author

[llvm]
assertions = true

[rust]
debug = true
debug-assertions = true
debug-assertions-std = true
overflow-checks = true
overflow-checks-std = true

@bors bors closed this as completed in b872552 Apr 10, 2023
Noratrieb added a commit to Noratrieb/rust that referenced this issue May 30, 2023
…ompiler-errors

Add a distinct `OperandValue::ZeroSized` variant for ZSTs

These tend to have special handling in a bunch of places anyway, so the variant helps remember that.  And I think it's easier to grok than `Aggregate`s sometimes being `Immediates` (after all, I previously got that wrong and caused rust-lang#109992).  As a minor bonus, it means we don't need to generate poison LLVM values for ZSTs to pass around in `OperandValue::Immediate`s.

Inspired by rust-lang#110021 (comment), so
r? `@compiler-errors`
Noratrieb added a commit to Noratrieb/rust that referenced this issue May 30, 2023
…ompiler-errors

Add a distinct `OperandValue::ZeroSized` variant for ZSTs

These tend to have special handling in a bunch of places anyway, so the variant helps remember that.  And I think it's easier to grok than `Aggregate`s sometimes being `Immediates` (after all, I previously got that wrong and caused rust-lang#109992).  As a minor bonus, it means we don't need to generate poison LLVM values for ZSTs to pass around in `OperandValue::Immediate`s.

Inspired by rust-lang#110021 (comment), so
r? ``@compiler-errors``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 31, 2023
…ompiler-errors

Add a distinct `OperandValue::ZeroSized` variant for ZSTs

These tend to have special handling in a bunch of places anyway, so the variant helps remember that.  And I think it's easier to grok than `Aggregate`s sometimes being `Immediates` (after all, I previously got that wrong and caused rust-lang#109992).  As a minor bonus, it means we don't need to generate poison LLVM values for ZSTs to pass around in `OperandValue::Immediate`s.

Inspired by rust-lang#110021 (comment), so
r? ```@compiler-errors```
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Jun 1, 2023
…ompiler-errors

Add a distinct `OperandValue::ZeroSized` variant for ZSTs

These tend to have special handling in a bunch of places anyway, so the variant helps remember that.  And I think it's easier to grok than `Aggregate`s sometimes being `Immediates` (after all, I previously got that wrong and caused rust-lang#109992).  As a minor bonus, it means we don't need to generate poison LLVM values for ZSTs to pass around in `OperandValue::Immediate`s.

Inspired by rust-lang#110021 (comment), so
r? `@compiler-errors`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants