Skip to content

ICE on misuse of Float::powf(), Float::exp(), Float::exp2(), Float::ln(), etc. #18175

Closed
@porglezomp

Description

@porglezomp

The following code ICEs

fn main() {
    Float::exp2(2.0f32); // Misuse produces ICE
}

Using the function correctly works, but I misread docs, it goes against C style and I'm not used to it, etc. etc.
It produces the following error:

error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace

task 'rustc' failed at 'assertion failed: `(left == right) && (right == left)` (left: `3`, right: `0`)', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/trans/callee.rs:528

stack backtrace:
   1:        0x11122eba9 - rt::backtrace::imp::write::h37f6a875ac6b1faadTq
   2:        0x111231e77 - failure::on_fail::ha0d7c2b5d797210dM9q
   3:        0x1114a72d5 - unwind::begin_unwind_inner::h8592212a9677a640bwd
   4:        0x1114a6f9c - unwind::begin_unwind_fmt::h6219a3bbf23fbac6Dtd
   5:        0x10e217aa5 - middle::trans::callee::trans_fn_ref_with_substs::h6f096e8e3f688f10tp3
   6:        0x10e214e51 - middle::trans::callee::trans_fn_ref::h7bbccdac16804408gd3
   7:        0x10e21dddb - middle::trans::callee::trans_call::closure.123295
   8:        0x10e1f6b14 - middle::trans::callee::trans_call_inner::h55aaa0a7bde8582abL3
   9:        0x10e21d4c7 - middle::trans::callee::trans_call::h7b4e2c8e6df15e7cwF3
  10:        0x10e22cf91 - middle::trans::expr::trans_rvalue_dps_unadjusted::h39b1e2c3f738ff77VT5
  11:        0x10e1eefd9 - middle::trans::expr::trans_into::hf8cf7932e7f2154etv4
  12:        0x10e1ee32c - middle::trans::controlflow::trans_stmt_semi::he272bee55161ef1fHK0
  13:        0x10e1ed9a0 - middle::trans::controlflow::trans_stmt::h0390fed190759d5fuG0
  14:        0x10e1ef228 - middle::trans::controlflow::trans_block::h7c868ed020abce21AL0
  15:        0x10e297ec2 - middle::trans::base::trans_closure::h25d2de8e59a72d7aDRg
  16:        0x10e1e200a - middle::trans::base::trans_fn::h10877aed033d0a4512g
  17:        0x10e1df745 - middle::trans::base::trans_item::h97c8a79a0f0fc5f8kmh
  18:        0x10e2a1308 - middle::trans::base::trans_crate::hccecf7aaa4e46ab47ji
  19:        0x10e6e5825 - driver::driver::phase_4_translate_to_llvm::h84739236ba6c4727RkA
  20:        0x10e6de1c6 - driver::driver::compile_input::h00dbfd22819e945aMRz
  21:        0x10e764a4f - driver::run_compiler::h328a12ddeecb656e6ED
  22:        0x10e762c26 - driver::run::closure.145941
  23:        0x10de75ffb - task::TaskBuilder<S>::try_future::closure.103316
  24:        0x10de75ee3 - task::TaskBuilder<S>::spawn_internal::closure.103287
  25:        0x10f07179d - task::spawn_opts::closure.8545
  26:        0x11150e89c - rust_try_inner
  27:        0x11150e886 - rust_try
  28:        0x1114a4947 - unwind::try::h830831e09adce3e0Tkd
  29:        0x1114a47cc - task::Task::run::h2ebb757597a20ac34Ac
  30:        0x10f0715c2 - task::spawn_opts::closure.8484
  31:        0x1114a618a - thread::thread_start::h2b706d41aa520cb4fVc
  32:     0x7fff87d6b772 - _pthread_start

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions