about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-25 08:04:36 +0000
committerbors <bors@rust-lang.org>2023-10-25 08:04:36 +0000
commit51ae1fe84922d2f8d0356696cd3be03077957960 (patch)
treef966a16fed2290e34dbab3443bde13398228f8c9 /compiler/rustc_codegen_cranelift/example
parent9c793e18dda209f17a96662a57216fced604e999 (diff)
parent19c4fa60eaddb0ea47130644a01127fc4f516452 (diff)
downloadrust-51ae1fe84922d2f8d0356696cd3be03077957960.tar.gz
rust-51ae1fe84922d2f8d0356696cd3be03077957960.zip
Auto merge of #3141 - rust-lang:rustup-2023-10-25, r=RalfJung
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example')
-rw-r--r--compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs b/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs
index 91de04d9770..afc51a47f14 100644
--- a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs
+++ b/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs
@@ -353,6 +353,17 @@ fn main() {
 
     let f = V([0.0, 1.0]);
     let _a = f.0[0];
+
+    stack_val_align();
+}
+
+#[inline(never)]
+fn stack_val_align() {
+    #[repr(align(8192))]
+    struct Foo(u8);
+
+    let a = Foo(0);
+    assert_eq!(&a as *const Foo as usize % 8192, 0);
 }
 
 #[cfg(all(