about summary refs log tree commit diff
path: root/src/test/assembly
diff options
context:
space:
mode:
authorhyd-dev <yd-huang@outlook.com>2021-03-25 18:49:35 +0800
committerhyd-dev <yd-huang@outlook.com>2021-04-11 22:32:40 +0800
commit2fd4dd20d717b3e8af4bdff2873b348920426425 (patch)
treed20af30295fee75b8cebd4de5d7ffbdd9777bcf2 /src/test/assembly
parent58f32da346642ff3f50186f6f4a0de46e61008be (diff)
downloadrust-2fd4dd20d717b3e8af4bdff2873b348920426425.tar.gz
rust-2fd4dd20d717b3e8af4bdff2873b348920426425.zip
Allow using `-C force-unwind-tables=no` when `panic=unwind`
Diffstat (limited to 'src/test/assembly')
-rw-r--r--src/test/assembly/panic-no-unwind-no-uwtable.rs8
-rw-r--r--src/test/assembly/panic-unwind-no-uwtable.rs12
2 files changed, 20 insertions, 0 deletions
diff --git a/src/test/assembly/panic-no-unwind-no-uwtable.rs b/src/test/assembly/panic-no-unwind-no-uwtable.rs
new file mode 100644
index 00000000000..499d4e69867
--- /dev/null
+++ b/src/test/assembly/panic-no-unwind-no-uwtable.rs
@@ -0,0 +1,8 @@
+// assembly-output: emit-asm
+// only-x86_64-unknown-linux-gnu
+// compile-flags: -C panic=unwind -C force-unwind-tables=n -O
+
+#![crate_type = "lib"]
+
+// CHECK-NOT: .cfi_startproc
+pub fn foo() {}
diff --git a/src/test/assembly/panic-unwind-no-uwtable.rs b/src/test/assembly/panic-unwind-no-uwtable.rs
new file mode 100644
index 00000000000..8eed72b2fca
--- /dev/null
+++ b/src/test/assembly/panic-unwind-no-uwtable.rs
@@ -0,0 +1,12 @@
+// assembly-output: emit-asm
+// only-x86_64-unknown-linux-gnu
+// compile-flags: -C panic=unwind -C force-unwind-tables=n
+
+#![crate_type = "lib"]
+
+// CHECK-LABEL: foo:
+// CHECK: .cfi_startproc
+#[no_mangle]
+fn foo() {
+    panic!();
+}