about summary refs log tree commit diff
path: root/tests/codegen/float
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2024-11-28 08:37:36 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2024-11-28 08:37:36 +0200
commitc91f2a328018916e64db56905cd0edc27c673d33 (patch)
tree334b4418e944ecfcb12eb158ebed6d144de7fc56 /tests/codegen/float
parent6e3cb4abfbbdb6fb7e34eed99840d1fe22c6b682 (diff)
parentf005c7437def424a1c43cbc380352a58d8ac920b (diff)
downloadrust-c91f2a328018916e64db56905cd0edc27c673d33.tar.gz
rust-c91f2a328018916e64db56905cd0edc27c673d33.zip
Merge from rust-lang/rust
Diffstat (limited to 'tests/codegen/float')
-rw-r--r--tests/codegen/float/f16-f128-inline.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/codegen/float/f16-f128-inline.rs b/tests/codegen/float/f16-f128-inline.rs
new file mode 100644
index 00000000000..aa2c38c209e
--- /dev/null
+++ b/tests/codegen/float/f16-f128-inline.rs
@@ -0,0 +1,29 @@
+//@ revisions: default nopt
+//@[nopt] compile-flags: -Copt-level=0 -Zcross-crate-inline-threshold=never -Zmir-opt-level=0 -Cno-prepopulate-passes
+
+// Ensure that functions using `f16` and `f128` are always inlined to avoid crashes
+// when the backend does not support these types.
+
+#![crate_type = "lib"]
+#![feature(f128)]
+#![feature(f16)]
+
+pub fn f16_arg(_a: f16) {
+    // CHECK-NOT: f16_arg
+    todo!()
+}
+
+pub fn f16_ret() -> f16 {
+    // CHECK-NOT: f16_ret
+    todo!()
+}
+
+pub fn f128_arg(_a: f128) {
+    // CHECK-NOT: f128_arg
+    todo!()
+}
+
+pub fn f128_ret() -> f128 {
+    // CHECK-NOT: f128_ret
+    todo!()
+}