Closed
Description
Following code causing ICE.
foo.rs
pub static fun: extern fn() = foo;
fn foo() {
println("Foo");
}
main.rs
extern mod foo;
fn main() {
(foo::fun)();
}
$ rustc --lib foo.rs
warning: missing crate link meta `name`, using `foo` as default
warning: missing crate link meta `vers`, using `0.0` as default
$ rustc main.rs -L .
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
If foo::foo
is declared as pub
, the code compiles successfully.