Skip to content

Compiler failure (vector initialization) #13446

Description

@nwin

The following code causes an compiler error (rust 0.10)

staticVEC:[u32, ..256] = vec!();fnmain(){}
$ RUST_BACKTRACE=1 rustc bug.rs <std macros>:4:13: 4:47 error: internal compiler error: no type for local variable 9u32
<std macros>:4 let mut _temp = ::std::vec::Vec::new();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at '~Any', /Users/rustbuild/src/rust-buildbot/slave/dist2-mac/build/src/libsyntax/diagnostic.rs:67
stack backtrace:
1: 0x1121d0874 - rt::backtrace::imp::write::h9ea05eaf0d1fcfbbg8b::v0.10
2: 0x112134ae6 - rt::unwind::begin_unwind_inner::h56a9a1d18da3bc52KIb::v0.10
3: 0x1118dff52 - rt::unwind::begin_unwind::haa9f7b363ab6af96kk2::v0.10
4: 0x1118dfed9 - diagnostic::SpanHandler::span_bug::h6b2673a810c5eef96Qb::v0.10
5: 0x10f3a0f71 - driver::session::Session::span_bug::h6dcb191babf54d17jhh::v0.10
6: 0x10f568b22 - middle::typeck::check::FnCtxt$LT$$x27a$GT$::local_ty::h1fe833457f59a616m98::v0.10
7: 0x10f60a543 - middle::typeck::check::check_decl_local::h14cbee88749e432bGlc::v0.10
8: 0x10f60a8d3 - middle::typeck::check::check_stmt::h67087dde4423ee38Cnc::v0.10
9: 0x10f5cf7ec - middle::typeck::check::check_block_with_expected::h0bf9276e4260ee4fRrc::v0.10
10: 0x10f5f0e3c - middle::typeck::check::check_expr_with_unifier::h6042dfecbcc27874X79::v0.10
11: 0x10f60b28e - middle::typeck::check::check_const_with_ty::h53754464d9e66252yxc::v0.10
12: 0x10f5d2be5 - middle::typeck::check::check_const::h7f16fc2fa50cb91fowc::v0.10
13: 0x10f5c62c1 - middle::typeck::check::check_item::h1573d40dd60b3c16Pg8::v0.10
14: 0x10f5cab4e - middle::typeck::check::check_item_types::h4a80759e68cc6ddeRV7::v0.10
15: 0x10f6f8d9f - util::common::time::h05ff57cec9836bbaXHh::v0.10
16: 0x10f6f7c19 - middle::typeck::check_crate::h51153d0ed6b4072ctTu::v0.10
17: 0x10fb08265 - driver::driver::phase_3_run_analysis_passes::h5f42793706d14fc1vxf::v0.10
18: 0x10fb0e553 - driver::driver::compile_input::h2233b341dfcf3481sWf::v0.10
19: 0x10fb34094 - run_compiler::h6a7725caa1e8ade5Yzn::v0.10
20: 0x10fb47d3d - main_args::closure.92068
21: 0x10fb46552 - monitor::closure.91953
22: 0x10fb420fb - task::TaskBuilder::try::closure.91728
23: 0x10f30327c - task::spawn_opts::closure.7957
24: 0x1121cbc98 - rt::task::Task::run::closure.41637
25: 0x1121d668c - rust_try
26: 0x1121cbb17 - rt::task::Task::run::hba645df05619b283NB9::v0.10
27: 0x10f3030ff - task::spawn_opts::closure.7929
28: 0x1121cf256 - rt::thread::thread_start::hd508203c7b2892d7uga::v0.10
29: 0x7fff85f83899 - _pthread_body
30: 0x7fff85f8372a - _pthread_struct_init

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions