Closed
Description
Found by @eddyb at #25570 (comment).
fn main() {
static A: i32 = 0;
static B: i32 = *&A;
println!("{:?}", B);
}
aborts the compiler:
Illegal instruction (core dumped)
playpen: application terminated with error code 132
static A: i32 = 0;
static B: i32 = *&A;
fn main() {
println!("{:?}", B);
}
prints 0
on the terminal without any warnings or errors
It doesn't really cause any weird behavior if it's a global static, it just acts as if the referred to static were a const: PlayPen