Skip to content

ICE: Referenced variable location is not an alloca #20164

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

Closed
ghost opened this issue Dec 23, 2014 · 2 comments
Closed

ICE: Referenced variable location is not an alloca #20164

ghost opened this issue Dec 23, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 23, 2014

Introduced in the last few days, happens with nonzero --debuginfo.

rustc 0.13.0-nightly (34d680009 2014-12-22 00:12:47 +0000).

#![crate_type="lib"]
#![allow(warnings)]

fn foo() {
    for _i in SIZES.iter() {}
}

static SIZES: [u64, ..1] = [
    40_u64,
];
jurily@jurily ~/p/p/scratch> rustc src/lib.rs # success
jurily@jurily ~/p/p/scratch> rustc src/lib.rs -g
src/lib.rs:5:9: 5:11 error: internal compiler error: debuginfo::create_for_loop_var_metadata() - Referenced variable location is not an alloca!
src/lib.rs:5     for _i in SIZES.iter() {}
                     ^~
note: the compiler unexpectedly panicked. 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
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/diagnostic.rs:123

stack backtrace:
   1:     0x7fbfd75047f0 - sys::backtrace::write::hc1f09f1eae19d77aQxt
   2:     0x7fbfd7525710 - failure::on_fail::h0fb87b850ab6cd900Xz
   3:     0x7fbfd74914a0 - rt::unwind::begin_unwind_inner::habde574b4f76ade20Bz
   4:     0x7fbfd2532f00 - rt::unwind::begin_unwind::h16328291673998487577
   5:     0x7fbfd2532e80 - diagnostic::SpanHandler::span_bug::hbb7934a78e265d5dSXF
   6:     0x7fbfd540c350 - session::Session::span_bug::h8e056d7b667a2fcb1on
   7:     0x7fbfd63932a0 - middle::pat_util::pat_bindings::closure.49058
   8:     0x7fbfd24fdd50 - ast_util::walk_pat::hab0b8805a667994dlxC
   9:     0x7fbfd62c0f90 - trans::expr::trans_rvalue_stmt_unadjusted::hb3ffc0f604cb73e4l4i
  10:     0x7fbfd627b2c0 - trans::expr::trans_into::h71668aa506e1a690uGh
  11:     0x7fbfd627ba20 - trans::controlflow::trans_block::hc167a4817215f70d9Zd
  12:     0x7fbfd6327310 - trans::base::trans_closure::h0f21c829c37744a86au
  13:     0x7fbfd626ffd0 - trans::base::trans_fn::h5a95a6b70c2d9335nmu
  14:     0x7fbfd626b520 - trans::base::trans_item::hf517e1dbb2128044rHu
  15:     0x7fbfd632f230 - trans::base::trans_crate::he5a814094c8a4da1HDv
  16:     0x7fbfd7a64f70 - driver::phase_4_translate_to_llvm::hc65b794b160978481Ca
  17:     0x7fbfd7a3be40 - driver::compile_input::hec1a59cac622cf55vba
  18:     0x7fbfd7be3220 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h10851168864564136615
  19:     0x7fbfd7be18d0 - rt::unwind::try::try_fn::h10692001439554181982
  20:     0x7fbfd75893f0 - rust_try_inner
  21:     0x7fbfd75893e0 - rust_try
  22:     0x7fbfd7be1c00 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h18028200319240022992
  23:     0x7fbfd7514f60 - sys::thread::thread_start::hdeb95f039f29863doww
  24:     0x7fbfd1d35190 - <unknown>
  25:     0x7fbfd7146f29 - __clone
  26:                0x0 - <unknown>
@mitchmindtree
Copy link
Contributor

I'm also hitting this

   Compiling pitch_calc v0.8.0 (file:///Users/Mitch/Programming/Rust/pitch_calc)
/Users/Mitch/Programming/Rust/pitch_calc/examples/test.rs:27:9: 27:10 error: internal compiler error: debuginfo::create_for_loop_var_metadata() - Referenced variable location is not an alloca!
/Users/Mitch/Programming/Rust/pitch_calc/examples/test.rs:27     for i in range(0u, 12) {
                                                                     ^
note: the compiler unexpectedly panicked. 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
thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:123

stack backtrace:
   1:        0x112c042f8 - sys::backtrace::write::he7909da9eb6468e9fBt
   2:        0x112c24c03 - failure::on_fail::hb7ba51d37f883f003Qz
   3:        0x112b90cfa - rt::unwind::begin_unwind_inner::hf4af2222e6b64258uyz
   4:        0x110a91d97 - rt::unwind::begin_unwind::h8565474196370893881
   5:        0x110a91d30 - rt::unwind::begin_unwind::h8565474196370893881
   6:        0x10ff0852d - session::Session::span_bug::hf51aebfd6f9bd43e1on
   7:        0x10f6b5904 - middle::pat_util::pat_bindings::closure.49095
   8:        0x110a5ccd1 - ast_util::walk_pat::h8ae3b0f1f213c350lxC
   9:        0x10f5eaa90 - trans::expr::trans_rvalue_stmt_unadjusted::hd7e98e6041ff86d1l4i
  10:        0x10f5a2835 - trans::expr::trans_into::h24b0113a1e4ebf0euGh
  11:        0x10f5a17cb - trans::controlflow::trans_stmt_semi::he012fdd638652fbcgZd
  12:        0x10f5a2e72 - trans::controlflow::trans_block::hc3b3fec5a3fb9ff79Zd
  13:        0x10f64d234 - trans::base::trans_closure::hd46f470562b1daa76au
  14:        0x10f597622 - trans::base::trans_fn::hbf7352ab9dfcd879nmu
  15:        0x10f592e33 - trans::base::trans_item::hf69d9d491dc08772rHu
  16:        0x10f653d38 - trans::base::trans_crate::h82eea2293a06ce55HDv
  17:        0x10f39550e - driver::phase_4_translate_to_llvm::h3268e7acb055bc171Ca
  18:        0x10f36f2d8 - driver::compile_input::ha7c31ba4e10c023avba
  19:        0x10f4e78e6 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h2822247860475515909
  20:        0x10f4e41e9 - rt::unwind::try::try_fn::h6416506685293600697
  21:        0x112c8ad29 - rust_try_inner
  22:        0x112c8ad16 - rust_try
  23:        0x10f4e48e7 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h15537213600061603954
  24:        0x112c141d4 - sys::thread::thread_start::h3cbfc0fe9ecfb222Kww
  25:     0x7fff886662fc - _pthread_body
  26:     0x7fff88666279 - _pthread_body

Build failed, waiting for other jobs to finish...
Could not compile `pitch_calc`.

To learn more, run the command again with --verbose.

shell returned 101

Here's a link to the very simple code where the error occurs.

@jdm
Copy link
Contributor

jdm commented Dec 23, 2014

Dup of #20127.

@jdm jdm closed this as completed Dec 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants