summaryrefslogtreecommitdiffstats
path: root/src/test/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs')
-rw-r--r--src/test/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs b/src/test/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
new file mode 100644
index 000000000..2783c83d3
--- /dev/null
+++ b/src/test/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
@@ -0,0 +1,17 @@
+// compile-flags: -C opt-level=0
+// ignore-wasm32-bare compiled with panic=abort by default
+
+#![crate_type = "lib"]
+
+// We disable optimizations to prevent LLVM from infering the attribute.
+
+extern "C" {
+ fn bar();
+}
+
+// CHECK-NOT: Function Attrs:{{.*}}nounwind
+pub unsafe extern "C" fn foo() {
+ bar();
+}
+
+// Note that this test will get removed when `C-unwind` is fully stabilized