2 // ignore-wasm32-bare seems not important to test here
4 #![feature(intrinsics, main)]
7 extern "rust-intrinsic" {
8 pub fn pref_align_of<T>() -> usize;
9 pub fn min_align_of<T>() -> usize;
13 #[cfg(any(target_os = "android",
14 target_os = "dragonfly",
15 target_os = "emscripten",
16 target_os = "freebsd",
20 target_os = "openbsd",
21 target_os = "solaris",
22 target_os = "vxworks"))]
25 #[cfg(target_arch = "x86")]
28 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
29 assert_eq!(::rusti::min_align_of::<u64>(), 4);
34 #[cfg(not(target_arch = "x86"))]
37 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
38 assert_eq!(::rusti::min_align_of::<u64>(), 8);
43 #[cfg(target_env = "sgx")]
46 #[cfg(target_arch = "x86_64")]
49 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
50 assert_eq!(::rusti::min_align_of::<u64>(), 8);
55 #[cfg(target_os = "windows")]
60 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
61 assert_eq!(::rusti::min_align_of::<u64>(), 8);