// Validation makes this fail in the wrong place
-// compile-flags: -Zmiri-disable-validation -Zmiri-seed=0000000000000000
+// compile-flags: -Zmiri-disable-validation
// Even with intptrcast and without validation, we want to be *sure* to catch bugs
// that arise from pointers being insufficiently aligned. The only way to achieve
+++ /dev/null
-// Validation makes this fail in the wrong place
-// compile-flags: -Zmiri-disable-validation -Zmiri-seed=0000000000000000
-
-fn main() {
- let g = unsafe {
- std::mem::transmute::<usize, fn(i32)>(42)
- };
-
- g(42) //~ ERROR dangling pointer was dereferenced
-}
+++ /dev/null
-// compile-flags: -Zmiri-seed=0000000000000000
-
-fn main() {
- let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR invalid use of NULL pointer
- panic!("this should never print: {}", x);
-}
+++ /dev/null
-// compile-flags: -Zmiri-seed=0000000000000000
-
-fn main() {
- let p = 44 as *const i32;
- let x = unsafe { *p }; //~ ERROR dangling pointer was dereferenced
- panic!("this should never print: {}", x);
-}