summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/tls_access.rs
blob: 450dd9b47302931791989c1bb80c2e0aea597449 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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;
    }
}