Skip to content

ICE: == on fat raw pointers #23888

Closed
Closed

Description

fn main() {
    let foo = (&0) as &Copy as *const Copy;
    let bar = (&0) as &Copy as *const Copy;
    foo == bar;
}
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: self.appropriate_rvalue_mode(bcx.ccx()) == ByValue', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_trans/trans/datum.rs:646

stack backtrace:
   1:     0x7f3918d93c59 - sys::backtrace::write::h433d43302839b3d0VvD
   2:     0x7f3918dbe56c - panicking::on_panic::h85bb7c48a7bf6d691LJ
   3:     0x7f3918ce4803 - rt::unwind::begin_unwind_inner::h30ebc8aea74a1411IrJ
   4:     0x7f391838b78c - rt::unwind::begin_unwind::h10484838493937027783
   5:     0x7f3918403750 - trans::datum::Datum<'tcx, K>::to_llscalarish::h9189384946395405902
   6:     0x7f391843add3 - trans::expr::trans_binary::heb43bd5fa524cd33Kqj
   7:     0x7f391842539e - trans::expr::trans_unadjusted::h1f5d1f6e14a57b3c4Uh
   8:     0x7f39183daf39 - trans::expr::trans_into::h655576f2875ea926rch
   9:     0x7f39183d9f9b - trans::controlflow::trans_stmt_semi::h256b34c2a2e46c1cC5d
  10:     0x7f39183dbbea - trans::controlflow::trans_block::hc0869fbf5d48b0f8p6d
  11:     0x7f39184b1e9f - trans::base::trans_closure::h4063065993f7ec27kct
  12:     0x7f39183c4986 - trans::base::trans_fn::he91160a474ae820b3mt
  13:     0x7f39183bf61f - trans::base::trans_item::hd707541ed01e4d77VKt
  14:     0x7f39184ba3a4 - trans::base::trans_crate::h742056e28861cc2crHu
  15:     0x7f391942e94f - driver::phase_4_translate_to_llvm::h2b16abbe80a4ad85iOa
  16:     0x7f391940647b - driver::compile_input::hc4e76294d74f8411Qba
  17:     0x7f39194bdda5 - run_compiler::h5900aba33b437c68p2b
  18:     0x7f39194bb85a - thunk::F.Invoke<A, R>::invoke::h9689564212340425420
  19:     0x7f39194baaa9 - rt::unwind::try::try_fn::h16505487216291884813
  20:     0x7f3918e38a78 - rust_try_inner
  21:     0x7f3918e38a65 - rust_try
  22:     0x7f39194bae07 - thunk::F.Invoke<A, R>::invoke::h14412175433843103066
  23:     0x7f3918da9551 - sys::thread::create::thread_start::hf9ba913050908365ulI
  24:     0x7f3912be1373 - start_thread
  25:     0x7f391895b27c - __clone
  26:                0x0 - <unknown>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)Area: Dynamically-sized types (DSTs)A-codegenArea: Code generationArea: Code generationI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions