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
246 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 19:44:25 +00:00
#![feature(thread_local)]
#[thread_local]
static mut FOO: u8 = 3;
fn main() {
unsafe {
let a = &FOO;
FOO = 42;
}
}