3 // This test exhibits undefined behavior, but it is very expensive and complex to check for such
5 // Thus, we do not detect it if you create references to statics in ways that are UB.
22 static FOO: (&Foo, &Bar) = unsafe {
25 Union { u8: &BAR }.foo,
26 Union { u8: &BAR }.bar,
29 static FOO2: (&Foo, &Bar) = unsafe { (std::mem::transmute(&BAR), std::mem::transmute(&BAR)) };
30 //^ undefined behavior