Closed
Description
Expected the following code to compile
#[cfg(target_arch = "x86")]
use core::arch::x86::*;
#[cfg(target_arch = "x86_64")]
use core::arch::x86_64::*;
unsafe fn pclmul(a: __m128i, b: __m128i, imm8: i32) -> __m128i {
_mm_clmulepi64_si128(a, b, imm8)
}
But getting
Standard Error
Compiling playground v0.0.1 (/playground)
thread 'rustc' panicked at 'index out of bounds: the len is 2 but the index is 3', /rustc/fbd34efb32b9efb574899e4335bdc8c6525ac27e/src/libcore/slice/mod.rs:2539:10
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
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 (fbd34efb3 2019-03-26) running on x86_64-unknown-linux-gnu
note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
Repro: