Closed
Description
The following code causes an internal error in rustc:
static TEST_VALUE : *[int, ..2] = 0x1234 as *[int, ..2];
TEST_VALUE
has to be immutable in order to reproduce it.
The mutability of the fixed-size array is irrelevant, so is the type and size of the array.
$ rustc -v
rustc 0.11-pre (b2a8fae 2014-04-26 23:41:31 -0700)
host: x86_64-unknown-linux-gnu
rustc
stack-trace:
error: internal compiler error: node_id_to_type: no type for node `expr 2 (id=15)`
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', /home/nulldata/tmp/rust/src/libsyntax/diagnostic.rs:155
stack backtrace:
1: 0x7f579f414e80 - rt::backtrace::imp::write::h2b6f969a24b1b09eowa::v0.11.pre
2: 0x7f579f3747d0 - rt::unwind::begin_unwind_inner::hdb76e09dc846d01bt69::v0.11.pre
3: 0x7f579ddad3c0 - rt::unwind::begin_unwind::h10397695711491808181::v0.11.pre
4: 0x7f579ddae420 - diagnostic::Handler::bug::h3fb33ca196e35b86AYb::v0.11.pre
5: 0x7f579fdd1e60 - driver::session::Session::bug::h70e242716dd3f2bf0qh::v0.11.pre
6: 0x7f579fe3a3e0 - middle::ty::node_id_to_type::ha9759be8e5e35875oCN::v0.11.pre
7: 0x7f57a01cda70 - middle::check_static::CheckStaticVisitor<'a>.Visitor<bool>::visit_expr::h189c60c9929d150e7tw::v0.11.pre
8: 0x7f57a01cd4a0 - visit::walk_ty::h3270741981541701909::v0.11.pre
9: 0x7f57a01cfff0 - visit::walk_expr::h7289780392057235172::v0.11.pre
10: 0x7f57a01cda70 - middle::check_static::CheckStaticVisitor<'a>.Visitor<bool>::visit_expr::h189c60c9929d150e7tw::v0.11.pre
11: 0x7f57a01cdfd0 - middle::check_static::CheckStaticVisitor<'a>.Visitor<bool>::visit_item::h9aff9d086f56d2e6wrw::v0.11.pre
12: 0x7f57a01cd030 - middle::check_static::check_crate::haadc53f88afae86epqw::v0.11.pre
13: 0x7f57a01aa0b0 - util::common::time::h12659127440207190207::v0.11.pre
14: 0x7f57a05e65c0 - driver::driver::phase_3_run_analysis_passes::h9aa6ff2a979a71d4TCf::v0.11.pre
15: 0x7f57a05ec4d0 - driver::driver::compile_input::hcb596bae171af93fG2f::v0.11.pre
16: 0x7f57a0611130 - run_compiler::h7eb65b0d03821ee1xzn::v0.11.pre
17: 0x7f57a0628fb0 - main_args::closure.91435
18: 0x7f57a06274b0 - monitor::closure.91310
19: 0x7f57a0622da0 - task::TaskBuilder::try::closure.91076
20: 0x7f57a23cb970 - task::spawn_opts::closure.7111
21: 0x7f579f40fec0 - rt::task::Task::run::closure.40113
22: 0x7f579f41adc0 - rust_try
23: 0x7f579f40fd00 - rt::task::Task::run::h219662be60998055wW7::v0.11.pre
24: 0x7f57a23cb740 - task::spawn_opts::closure.7084
25: 0x7f579f4139c0 - rt::thread::thread_start::h600ba7798d54a948JB8::v0.11.pre
26: 0x7f579ed300c0 - start_thread
27: 0x7f579f0412d9 - __clone
28: 0x0 - <unknown>