2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2022-05-30 18:26:02 -05:00
|
|
|
// EMIT_MIR tls_access.main.PreCodegen.after.mir
|
2024-02-22 06:10:29 -06:00
|
|
|
//@ compile-flags: -Zmir-opt-level=0
|
2022-05-30 18:26:02 -05:00
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|