rust/tests/mir-opt/tls_access.rs
2023-10-19 15:51:52 +00:00

16 lines
245 B
Rust

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