mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
15 lines
227 B
Rust
15 lines
227 B
Rust
// 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;
|
|
}
|
|
}
|