]> git.lizzy.rs Git - rust.git/blob - tests/codegen/stack-probes-inline.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / codegen / stack-probes-inline.rs
1 // Check the "probe-stack" attribute for targets with `StackProbeType::Inline`,
2 // or `StackProbeType::InlineOrCall` when running on newer LLVM.
3
4 // compile-flags: -C no-prepopulate-passes
5 // revisions: powerpc powerpc64 powerpc64le s390x i686 x86_64
6 //[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
7 //[powerpc] needs-llvm-components: powerpc
8 //[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu
9 //[powerpc64] needs-llvm-components: powerpc
10 //[powerpc64le] compile-flags: --target powerpc64le-unknown-linux-gnu
11 //[powerpc64le] needs-llvm-components: powerpc
12 //[s390x] compile-flags: --target s390x-unknown-linux-gnu
13 //[s390x] needs-llvm-components: systemz
14 //[i686] compile-flags: --target i686-unknown-linux-gnu
15 //[i686] needs-llvm-components: x86
16 //[i686] min-llvm-version: 16
17 //[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
18 //[x86_64] needs-llvm-components: x86
19 //[x86_64] min-llvm-version: 16
20
21 #![crate_type = "rlib"]
22 #![feature(no_core, lang_items)]
23 #![no_core]
24
25 #[lang = "sized"]
26 trait Sized {}
27
28 #[no_mangle]
29 pub fn foo() {
30 // CHECK: @foo() unnamed_addr #0
31 // CHECK: attributes #0 = { {{.*}}"probe-stack"="inline-asm"{{.*}} }
32 }