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 in shuffle! #324

Closed
TheIronBorn opened this issue Jul 5, 2021 · 1 comment
Closed

ICE in shuffle! #324

TheIronBorn opened this issue Jul 5, 2021 · 1 comment

Comments

@TheIronBorn
Copy link
Contributor

TheIronBorn commented Jul 5, 2021

I came across an ICE in the shuffle macro. Hopefully someone here can find a more minimal example.

error: internal compiler error: /rustc/b3d11f95cc5dd687fdd185ce91e02ebe40e6f46b\compiler\rustc_middle\src\ty\consts.rs:195:32: expected bits of [u32; 2], got Const {

$ rustc --version --verbose
rustc 1.55.0-nightly (b3d11f95c 2021-07-04)
binary: rustc
commit-hash: b3d11f95cc5dd687fdd185ce91e02ebe40e6f46b
commit-date: 2021-07-04
host: x86_64-pc-windows-msvc
release: 1.55.0-nightly
LLVM version: 12.0.1
use packed_simd::{u8x2, shuffle};

pub fn foo(x: u8x2) -> u8x2 {
    shuffle!(x, [1, 0])
}
click to expand full output of `RUST_BACKTRACE=full cargo build -vv`
error: internal compiler error: /rustc/b3d11f95cc5dd687fdd185ce91e02ebe40e6f46b\compiler\rustc_middl
e\src\ty\consts.rs:195:32: expected bits of [u32; 2], got Const {
    ty: [u32; 2],
    val: Value(
        ByRef {
            alloc: Allocation {
                bytes: [
                    1,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                ],
                relocations: Relocations(
                    SortedMap {
                        data: [],
                    },
                ),
                init_mask: InitMask {
                    blocks: [
                        255,
                    ],
                    len: Size {
                        raw: 8,
                    },
                },
                align: Align {
                    pow2: 2,
                },
                mutability: Not,
                extra: (),
            },
            offset: Size {
                raw: 0,
            },
        },
    ),
}

thread 'rustc' panicked at 'Box<dyn Any>', compiler\rustc_errors\src\lib.rs:1006:9
stack backtrace:
   0:     0x7ff91e7b73cf - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Displ
ay>::fmt::h6ba2a9241bb86732
   1:     0x7ff91e7dff7a - core::fmt::write::ha9fdc24e2055a123
   2:     0x7ff91e7aa948 - <std::io::IoSlice as core::fmt::Debug>::fmt::h2f7de836a9fea840
   3:     0x7ff91e7bb106 - std::panicking::take_hook::h880a3a97a8692ac2
   4:     0x7ff91e7babe9 - std::panicking::take_hook::h880a3a97a8692ac2
   5:     0x7ff90bd546d5 - <sha2::sha512::Sha512Trunc224 as std::io::Write>::flush::hee6b95fd494feb4
c
   6:     0x7ff91e7bba00 - std::panicking::rust_panic_with_hook::hf71bb7c83433b29f
   7:     0x7ff90ffadbd0 - <rustc_errors::lock::acquire_global_lock::Guard as core::ops::drop::Drop>
::drop::h4f8f15aa7cec4dfd
   8:     0x7ff90ffadb79 - <rustc_errors::lock::acquire_global_lock::Guard as core::ops::drop::Drop>
::drop::h4f8f15aa7cec4dfd
   9:     0x7ff91026afd1 - rustc_query_system::query::job::report_cycle::h6ad95b2abe0c2755
  10:     0x7ff90ffdc6e0 - <rustc_errors::json::Diagnostic::from_errors_diagnostic::BufWriter as std
::io::Write>::flush::h047ec1cbb3679d84
  11:     0x7ff90ffe3025 - rustc_errors::HandlerInner::emit_diagnostic::heb8a31dc5e552518
  12:     0x7ff90ffe0b92 - rustc_errors::Handler::bug::hb2ff7ec66402551f
  13:     0x7ff90fccd657 - rustc_middle::ty::structural_impls::<impl core::fmt::Debug for rustc_midd
le::ty::adt::AdtDef>::fmt::h5869c3d44553f282
  14:     0x7ff90fccbca0 - rustc_middle::ty::consts::valtree::ValTree::zst::hb865eec6f9683d1a
  15:     0x7ff90fccbc48 - rustc_middle::ty::consts::valtree::ValTree::zst::hb865eec6f9683d1a
  16:     0x7ff90fccd589 - rustc_middle::ty::structural_impls::<impl core::fmt::Debug for rustc_midd
le::ty::adt::AdtDef>::fmt::h5869c3d44553f282
  17:     0x7ff91025e327 - rustc_middle::util::bug::bug_fmt::hf198e31916c1b343
  18:     0x7ff90f3afec4 - <rustc_codegen_ssa::mir::analyze::CleanupKind as core::fmt::Debug>::fmt::
h5a59164a64d0c7a5
  19:     0x7ff90f3b704a - rustc_codegen_ssa::debuginfo::type_names::push_item_name::he75481756ae840
39
  20:     0x7ff90f3b7168 - rustc_codegen_ssa::debuginfo::type_names::push_generic_params::h1d7916d50
aafc08c
  21:     0x7ff90c01440c - <rustc_codegen_llvm::debuginfo::CrateDebugContext as core::ops::drop::Dro
p>::drop::h3f55eba9dc119554
  22:     0x7ff90bff897c - rustc_codegen_llvm::debuginfo::<impl rustc_codegen_ssa::traits::debuginfo
::DebugInfoMethods for rustc_codegen_llvm::context::CodegenCx>::dbg_scope_fn::h7630bb4433b6b0de
  23:     0x7ff90bff82e1 - rustc_codegen_llvm::debuginfo::<impl rustc_codegen_ssa::traits::debuginfo
::DebugInfoMethods for rustc_codegen_llvm::context::CodegenCx>::create_function_debug_context::hd74d
70b70418a925
  24:     0x7ff90c06c3e6 - <rustc_type_ir::FloatTy as rustc_codegen_llvm::debuginfo::metadata::MsvcB
asicName>::msvc_basic_name::h6b1292e95eb170dd
  25:     0x7ff90c0030e2 - <rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS> as rustc_codegen_
llvm::type_of::LayoutLlvmExt>::pointee_info_at::hf141ea5b2b5b9458
  26:     0x7ff90c02e60c - <rustc_codegen_llvm::llvm_::ffi::PassKind as core::fmt::Debug>::fmt::h73e
4370ce386cd1a
  27:     0x7ff90c03c81f - <rustc_codegen_llvm::base::ValueIter as core::iter::traits::iterator::Ite
rator>::next::he88ed3976c9ce471
  28:     0x7ff90bfaa09e - <rustc_codegen_llvm::llvm_::archive_ro::Child as core::ops::drop::Drop>::
drop::h4adaeb3876bff26c
  29:     0x7ff90c005313 - <rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS> as rustc_codegen_
llvm::type_of::LayoutLlvmExt>::pointee_info_at::hf141ea5b2b5b9458
  30:     0x7ff90c03c133 - <rustc_codegen_llvm::base::ValueIter as core::iter::traits::iterator::Ite
rator>::next::he88ed3976c9ce471
  31:     0x7ff90c017cdd - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::bac
kend::CodegenBackend>::codegen_crate::h2e599f3191e20a15
  32:     0x7ff90be99b0d - rustc_interface::queries::Linker::link::he04c478b0566dbcf
  33:     0x7ff90be8e786 - rustc_interface::queries::Queries::ongoing_codegen::hdb76edc87db3cf80
  34:     0x7ff90bdaa7bf - <rustc_middle::ty::SymbolName as core::fmt::Debug>::fmt::h1888c009faa2f58
c
  35:     0x7ff90bd7234d - rustc_driver::pretty::print_after_hir_lowering::h982e6ec8534626ef
  36:     0x7ff90bdac7e9 - <rustc_middle::ty::SymbolName as core::fmt::Debug>::fmt::h1888c009faa2f58
c
  37:     0x7ff90bd7c9ba - <rustc_middle::ty::SymbolName as core::fmt::Debug>::fmt::h1888c009faa2f58
c
  38:     0x7ff90bd72f5f - rustc_driver::pretty::print_after_hir_lowering::h982e6ec8534626ef
  39:     0x7ff90bdd0f9d - <rustc_driver::args::Error as core::fmt::Debug>::fmt::hac2312e292f84c23
  40:     0x7ff91e7c92dc - std::sys::windows::thread::Thread::new::hd7a080f67ca1d43d
  41:     0x7ff95df17034 - BaseThreadInitThunk
  42:     0x7ff95e582651 - RtlUserThreadStart
@workingjubilee
Copy link
Member

Appears to be resolved upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants