rust/tests/mir-opt/tls_access.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
245 B
Rust
Raw Normal View History

// skip-filecheck
// EMIT_MIR tls_access.main.PreCodegen.after.mir
// compile-flags: -Zmir-opt-level=0
2020-05-02 14:44:25 -05:00
#![feature(thread_local)]
#[thread_local]
static mut FOO: u8 = 3;
fn main() {
unsafe {
let a = &FOO;
FOO = 42;
}
}