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

Compiler failure (vector initialization) #13446

Closed
nwin opened this issue Apr 10, 2014 · 2 comments
Closed

Compiler failure (vector initialization) #13446

nwin opened this issue Apr 10, 2014 · 2 comments
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@nwin
Copy link
Contributor

nwin commented Apr 10, 2014

The following code causes an compiler error (rust 0.10)

static VEC: [u32, ..256] = vec!();
fn main() {}
$ 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
@Sawyer47
Copy link
Contributor

Sawyer47 commented Jun 8, 2014

It looks like it no longer causes ICE

$ rustc --version
rustc 0.11.0-pre-nightly (7580ef9 2014-06-08 00:46:57 -0700)
host: x86_64-unknown-linux-gnu
$ rusct issue-13446.rs:issue-13446.rs:1:28: 1:35 error: mismatched types: expected `[u32, .. 256]` but found `collections::vec::Vec<<generic #2>>` (expected vector but found struct collections::vec::Vec)
issue-13446.rs:1 static VEC: [u32, ..256] = vec!();
                                            ^~~~~~~
error: aborting due to previous error

@alexcrichton
Copy link
Member

Awesome! Flagging as needstest.

Sawyer47 added a commit to Sawyer47/rust that referenced this issue Jun 9, 2014
bors added a commit that referenced this issue Jun 10, 2014
Closes #14611 (std: Remove the as_utf16_p functions)
Closes #14694 (Num cleanup)
Closes #14760 (Add --color to test binary options)
Closes #14763 (std: Move dynamic_lib from std::unstable to std)
Closes #14766 (Add test for issue #13446)
Closes #14769 (collections: Add missing Default impls)
Closes #14773 (General nits)
Closes #14776 (rustdoc: Correctly classify enums/typedefs)
mcpherrinm pushed a commit to mcpherrinm/rust that referenced this issue Jun 10, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 3, 2024
…1995

Update actions/setup-node to v4

changelog: none

Required for using Node.js 20.x in CI
* Changelog for actions/checkout@v4 https://github.com/actions/checkout/blob/main/CHANGELOG.md?rgh-link-date=2024-09-04T18%3A38%3A10Z#v400
* GitHub Blog post https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/

Example warning: https://github.com/rust-lang/rust-clippy/actions/runs/11003847751
> The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-node@v3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants