Closed
Description
Not sure if this is a codegen bug or just something that's not supported by LLVM
#![feature(thread_local)]
#[thread_local]
static FOO: uint = 0;
static BAR: &'static uint = &FOO;
fn main() {
println!("{}", *BAR);
}
$ rustc foo.rs && ./foo
282584257676671
$ rustc foo.rs --opt-level=3 && ./foo
0