1 // Make sure we find these even with many checks disabled.
2 // Some optimizations remove ZST accesses, thus masking this UB.
3 //@compile-flags: -Zmir-opt-level=0 -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
8 &*b as *const i32 as *const ()
10 let _x = unsafe { *p }; //~ ERROR: dereferenced after this allocation got freed