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: assertion failed: !is_undef(val) #24599

Closed
nagisa opened this issue Apr 19, 2015 · 2 comments
Closed

ICE: assertion failed: !is_undef(val) #24599

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

Comments

@nagisa
Copy link
Member

nagisa commented Apr 19, 2015

code:

#![crate_type="rlib"]
fn test() -> (u8,) {
    (-1.0 as u8,)
}

output:

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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: !is_undef(val)', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_trans/trans/adt.rs:1191

stack backtrace:
   1:     0x7efef723ab39 - sys::backtrace::write::hc94f8d9af2b8711fGUs
   2:     0x7efef72427c6 - panicking::on_panic::hc9accb046dad794bVhx
   3:     0x7efef72006f2 - rt::unwind::begin_unwind_inner::ha72df769ba895a835Ww
   4:     0x7efef690e37e - rt::unwind::begin_unwind::h5106877066291017917
   5:     0x7efef694fc91 - trans::adt::build_const_struct::hbb786125a90b0fb7Xmf
   6:     0x7efef694ef56 - trans::adt::trans_const::h6cc90ccc1716f7e53cf
   7:     0x7efef69d7af4 - trans::consts::const_expr_unadjusted::ha82c6847f10eb80czLs
   8:     0x7efef697fd02 - trans::consts::const_expr::ha03b4aa86aea5b9envs
   9:     0x7efef69d6a3a - trans::consts::get_const_expr_as_global::h64bc675b732942d1yss
  10:     0x7efef69ece6e - trans::expr::trans_into::hd1fc0e2f51949c52W6z
  11:     0x7efef697204e - trans::controlflow::trans_block::h3006d43e68f8b11dZ2u
  12:     0x7efef6970af1 - trans::base::trans_closure::h58b74be4b3f2d114KCh
  13:     0x7efef697262a - trans::base::trans_fn::h8b381b99cc95435dsNh
  14:     0x7efef69756c7 - trans::base::trans_item::h0f743e9af025fb97Ebi
  15:     0x7efef6983a1d - trans::base::trans_crate::hc043d7f7defe4b48E0i
  16:     0x7efef77abe0a - driver::phase_4_translate_to_llvm::h646ecc6a8cb7c383lOa
  17:     0x7efef77840ba - driver::compile_input::h3818778b4ba8e92bQba
  18:     0x7efef7844331 - run_compiler::h474493aa09b9a3f5D4b
  19:     0x7efef7841f82 - boxed::F.FnBox<A>::call_box::h16338820608853103440
  20:     0x7efef78414b9 - rt::unwind::try::try_fn::h1219638071771381846
  21:     0x7efef72b9fd8 - rust_try_inner
  22:     0x7efef72b9fc5 - rust_try
  23:     0x7efef7841768 - boxed::F.FnBox<A>::call_box::h2630035671385432388
  24:     0x7efef72416b1 - sys::thread::create::thread_start::h8a67470ee39a7f26cgw
  25:     0x7efef12f8373 - start_thread
  26:     0x7efef6e8927c - clone
  27:                0x0 - <unknown>

EDIT: minimized example a bit

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

huonw commented Jan 8, 2016

cc #10184

@Mark-Simulacrum
Copy link
Member

No longer ICEs, warning list below:

warning: function is never used: `test`
 --> <anon>:2:1
  |
2 |   fn test() -> (u8,) {
  |  _^ starting here...
3 | |     (-1.0 as u8,)
4 | | }
  | |_^ ...ending here
  |
  = note: #[warn(dead_code)] on by default

warning: can't cast this type
 --> <anon>:3:6
  |
3 |     (-1.0 as u8,)
  |      ^^^^^^^^^^
  |
  = note: #[warn(const_err)] on by default

warning: can't cast this type
 --> <anon>:3:6
  |
3 |     (-1.0 as u8,)
  |      ^^^^^^^^^^
  |
  = note: #[warn(const_err)] on by default

warning: can't cast this type
 --> <anon>:3:6
  |
3 |     (-1.0 as u8,)
  |      ^^^^^^^^^^
  |
  = note: #[warn(const_err)] on by default

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