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 when using simd Shl/Shr. #24716

Closed
ghost opened this issue Apr 23, 2015 · 2 comments
Closed

ICE when using simd Shl/Shr. #24716

ghost opened this issue Apr 23, 2015 · 2 comments
Assignees
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@ghost
Copy link

ghost commented Apr 23, 2015

The following code:

#![feature(core)]
use std::simd::u32x4;
fn main() {
    let a = u32x4(1, 1, 1, 1);
    println!("{:?}", a >> a);
}

Will cause an ICE:

rustc: /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/include/llvm/Support/Casting.h:237: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::IntegerType; Y = llvm::Type; typename llvm::cast_retty<X, Y*>::ret_type = llvm::IntegerType*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

Tested with:
rustc 1.0.0-nightly (00978a987 2015-04-18) (built 2015-04-19)

@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 23, 2015
@nagisa
Copy link
Member

nagisa commented Apr 23, 2015

Backtrace:

#0  0x00007ffff71214b7 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff712288a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff711a41d in __assert_fail_base () from /usr/lib/libc.so.6
#3  0x00007ffff711a4d2 in __assert_fail () from /usr/lib/libc.so.6
#4  0x00007ffff33b1c26 in LLVMGetIntTypeWidth () from /usr/lib/librustc_llvm-4e7c5e5c.so
#5  0x00007ffff642a868 in trans::expr::with_overflow_check::he5253192521ec9a5r3C () from /usr/lib/librustc_trans-4e7c5e5c.so
#6  0x00007ffff6429990 in trans::expr::trans_eager_binop::h292f9140d3808be0XXB () from /usr/lib/librustc_trans-4e7c5e5c.so
#7  0x00007ffff64116f8 in trans::expr::trans_binary::h3ee81b832d50e04aQ7B () from /usr/lib/librustc_trans-4e7c5e5c.so
#8  0x00007ffff6407fcd in trans::expr::trans_unadjusted::hc3ce9610782cf186bBA () from /usr/lib/librustc_trans-4e7c5e5c.so
#9  0x00007ffff6342ee5 in trans::expr::trans::h3b8a71d71595e7daieA () from /usr/lib/librustc_trans-4e7c5e5c.so
#10 0x00007ffff63dd6e6 in trans::expr::trans_to_lvalue::h19541a978e837061kAA () from /usr/lib/librustc_trans-4e7c5e5c.so
#11 0x00007ffff6412668 in trans::expr::trans_addr_of::h1e1819086c87bec9EWB () from /usr/lib/librustc_trans-4e7c5e5c.so
#12 0x00007ffff6408281 in trans::expr::trans_unadjusted::hc3ce9610782cf186bBA () from /usr/lib/librustc_trans-4e7c5e5c.so
#13 0x00007ffff63ddb19 in trans::expr::trans_into::h29921dbc618efbf6Z7z () from /usr/lib/librustc_trans-4e7c5e5c.so
#14 0x00007ffff6365a45 in trans::expr::trans_adt::hd4e831ad12fd8a76nCB () from /usr/lib/librustc_trans-4e7c5e5c.so
#15 0x00007ffff640a520 in trans::expr::trans_rvalue_dps_unadjusted::h23ca6fff2ccc7183E6A () from /usr/lib/librustc_trans-4e7c5e5c.so
#16 0x00007ffff6407e3c in trans::expr::trans_unadjusted::hc3ce9610782cf186bBA () from /usr/lib/librustc_trans-4e7c5e5c.so
#17 0x00007ffff6342ee5 in trans::expr::trans::h3b8a71d71595e7daieA () from /usr/lib/librustc_trans-4e7c5e5c.so
#18 0x00007ffff63dd6e6 in trans::expr::trans_to_lvalue::h19541a978e837061kAA () from /usr/lib/librustc_trans-4e7c5e5c.so
#19 0x00007ffff64469df in trans::_match::trans_match_inner::he371c258a59665e6M3H () from /usr/lib/librustc_trans-4e7c5e5c.so
#20 0x00007ffff6408f54 in trans::expr::trans_rvalue_dps_unadjusted::h23ca6fff2ccc7183E6A () from /usr/lib/librustc_trans-4e7c5e5c.so
#21 0x00007ffff6407e3c in trans::expr::trans_unadjusted::hc3ce9610782cf186bBA () from /usr/lib/librustc_trans-4e7c5e5c.so
#22 0x00007ffff6342ee5 in trans::expr::trans::h3b8a71d71595e7daieA () from /usr/lib/librustc_trans-4e7c5e5c.so
#23 0x00007ffff63dd6e6 in trans::expr::trans_to_lvalue::h19541a978e837061kAA () from /usr/lib/librustc_trans-4e7c5e5c.so
#24 0x00007ffff6412668 in trans::expr::trans_addr_of::h1e1819086c87bec9EWB () from /usr/lib/librustc_trans-4e7c5e5c.so
#25 0x00007ffff6408281 in trans::expr::trans_unadjusted::hc3ce9610782cf186bBA () from /usr/lib/librustc_trans-4e7c5e5c.so
#26 0x00007ffff6342ee5 in trans::expr::trans::h3b8a71d71595e7daieA () from /usr/lib/librustc_trans-4e7c5e5c.so
#27 0x00007ffff639e7e1 in trans::callee::trans_args::h92bc32104237e2eeJlo () from /usr/lib/librustc_trans-4e7c5e5c.so
#28 0x00007ffff63a48e6 in trans::callee::trans_call_inner::h13923129202235756849 () from /usr/lib/librustc_trans-4e7c5e5c.so
#29 0x00007ffff6409905 in trans::expr::trans_rvalue_dps_unadjusted::h23ca6fff2ccc7183E6A () from /usr/lib/librustc_trans-4e7c5e5c.so
#30 0x00007ffff6407e3c in trans::expr::trans_unadjusted::hc3ce9610782cf186bBA () from /usr/lib/librustc_trans-4e7c5e5c.so
#31 0x00007ffff6342ee5 in trans::expr::trans::h3b8a71d71595e7daieA () from /usr/lib/librustc_trans-4e7c5e5c.so
#32 0x00007ffff639e7e1 in trans::callee::trans_args::h92bc32104237e2eeJlo () from /usr/lib/librustc_trans-4e7c5e5c.so
#33 0x00007ffff63a48e6 in trans::callee::trans_call_inner::h13923129202235756849 () from /usr/lib/librustc_trans-4e7c5e5c.so
#34 0x00007ffff6409905 in trans::expr::trans_rvalue_dps_unadjusted::h23ca6fff2ccc7183E6A () from /usr/lib/librustc_trans-4e7c5e5c.so
#35 0x00007ffff63ddaf8 in trans::expr::trans_into::h29921dbc618efbf6Z7z () from /usr/lib/librustc_trans-4e7c5e5c.so
#36 0x00007ffff63dd670 in trans::controlflow::trans_stmt_semi::h340507b8f88d853d62u () from /usr/lib/librustc_trans-4e7c5e5c.so
#37 0x00007ffff6363663 in trans::controlflow::trans_block::he2b0363ba483aa5723u () from /usr/lib/librustc_trans-4e7c5e5c.so
#38 0x00007ffff6362387 in trans::base::trans_closure::h0dc61076718b152eBDh () from /usr/lib/librustc_trans-4e7c5e5c.so
#39 0x00007ffff6363f8b in trans::base::trans_fn::h017a63e4b4f1d383jOh () from /usr/lib/librustc_trans-4e7c5e5c.so
#40 0x00007ffff6367008 in trans::base::trans_item::h694a5c0c3e92277bvci () from /usr/lib/librustc_trans-4e7c5e5c.so
#41 0x00007ffff63753be in trans::base::trans_crate::h93b35940c9d58579v1i () from /usr/lib/librustc_trans-4e7c5e5c.so
#42 0x00007ffff7af8d5b in driver::phase_4_translate_to_llvm::h0cea9caf6133630enOa () from /usr/lib/librustc_driver-4e7c5e5c.so
#43 0x00007ffff7ad105c in driver::compile_input::h4642f691e22278cbQba () from /usr/lib/librustc_driver-4e7c5e5c.so
#44 0x00007ffff7b91332 in run_compiler::he528ba831532b90aF4b () from /usr/lib/librustc_driver-4e7c5e5c.so
#45 0x00007ffff7b8ef83 in boxed::F.FnBox$LT$A$GT$::call_box::h13568337174014462877 () from /usr/lib/librustc_driver-4e7c5e5c.so
#46 0x00007ffff7b8e4ba in rt::unwind::try::try_fn::h15381261312250239500 () from /usr/lib/librustc_driver-4e7c5e5c.so
#47 0x00007ffff7608529 in rust_try_inner () from /usr/lib/libstd-4e7c5e5c.so
#48 0x00007ffff7608516 in rust_try () from /usr/lib/libstd-4e7c5e5c.so
#49 0x00007ffff7b8e769 in boxed::F.FnBox$LT$A$GT$::call_box::h6713016946069099629 () from /usr/lib/librustc_driver-4e7c5e5c.so
#50 0x00007ffff758fac2 in sys::thread::create::thread_start::hbe89fbdfc755452dxjw () from /usr/lib/libstd-4e7c5e5c.so
#51 0x00007ffff165c374 in start_thread () from /usr/lib/libpthread.so.0
#52 0x00007ffff71d627d in clone () from /usr/lib/libc.so.6

Related: #11900

cc @pnkfelix, because you implemented overflow checking.

@pnkfelix pnkfelix self-assigned this Apr 23, 2015
@Gankra
Copy link
Contributor

Gankra commented May 12, 2015

Dupe of #24258

@Gankra Gankra closed this as completed May 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants