about summary refs log tree commit diff
path: root/tests/codegen/function-return.rs
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-07-23 14:59:10 +0200
committerJakub Beránek <berykubik@gmail.com>2025-07-23 14:59:10 +0200
commit67f73c75477338560fb78003149c11a9fa7d4820 (patch)
tree7792f3f9786658de9949e9c27ac4dfb8c63fdb8d /tests/codegen/function-return.rs
parenta343926954a525f491756c3c9714417ae9ccc121 (diff)
parent0b88bea0d5169af3b3f9326274bda8b9c4a31823 (diff)
downloadrust-67f73c75477338560fb78003149c11a9fa7d4820.tar.gz
rust-67f73c75477338560fb78003149c11a9fa7d4820.zip
Merge ref '5a30e4307f05' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 5a30e4307f0506bed87eeecd171f8366fdbda1dc
Filtered ref: 59749e9f8c765d3021796a9fe0c188643c4b8d77

This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'tests/codegen/function-return.rs')
-rw-r--r--tests/codegen/function-return.rs35
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/codegen/function-return.rs b/tests/codegen/function-return.rs
deleted file mode 100644
index 4127f516038..00000000000
--- a/tests/codegen/function-return.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Test that the `fn_ret_thunk_extern` function attribute is (not) emitted when
-// the `-Zfunction-return={keep,thunk-extern}` flag is (not) set.
-
-//@ add-core-stubs
-//@ revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep
-//@ needs-llvm-components: x86
-//@ compile-flags: --target x86_64-unknown-linux-gnu
-//@ [keep] compile-flags: -Zfunction-return=keep
-//@ [thunk-extern] compile-flags: -Zfunction-return=thunk-extern
-//@ [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern
-//@ [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep
-
-#![crate_type = "lib"]
-#![feature(no_core, lang_items)]
-#![no_core]
-
-extern crate minicore;
-use minicore::*;
-
-#[no_mangle]
-pub fn foo() {
-    // CHECK: @foo() unnamed_addr #0
-
-    // unset-NOT: fn_ret_thunk_extern
-    // keep-NOT: fn_ret_thunk_extern
-    // thunk-extern: attributes #0 = { {{.*}}fn_ret_thunk_extern{{.*}} }
-    // keep-thunk-extern: attributes #0 = { {{.*}}fn_ret_thunk_extern{{.*}} }
-    // thunk-extern-keep-NOT: fn_ret_thunk_extern
-}
-
-// unset-NOT: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}
-// keep-NOT: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}
-// thunk-extern: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}
-// keep-thunk-extern: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}
-// thunk-extern-keep-NOT: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}