about summary refs log tree commit diff
path: root/src/test/ui/llvm-asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/llvm-asm')
-rw-r--r--src/test/ui/llvm-asm/asm-src-loc-codegen-units.rs12
-rw-r--r--src/test/ui/llvm-asm/asm-src-loc.rs11
2 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/llvm-asm/asm-src-loc-codegen-units.rs b/src/test/ui/llvm-asm/asm-src-loc-codegen-units.rs
new file mode 100644
index 00000000000..387822d00f6
--- /dev/null
+++ b/src/test/ui/llvm-asm/asm-src-loc-codegen-units.rs
@@ -0,0 +1,12 @@
+// build-fail
+// dont-check-compiler-stderr
+// compile-flags: -C codegen-units=2
+// ignore-emscripten
+
+#![feature(llvm_asm)]
+
+fn main() {
+    unsafe {
+        llvm_asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
+    }
+}
diff --git a/src/test/ui/llvm-asm/asm-src-loc.rs b/src/test/ui/llvm-asm/asm-src-loc.rs
new file mode 100644
index 00000000000..063066df11c
--- /dev/null
+++ b/src/test/ui/llvm-asm/asm-src-loc.rs
@@ -0,0 +1,11 @@
+// build-fail
+// dont-check-compiler-stderr
+// ignore-emscripten
+
+#![feature(llvm_asm)]
+
+fn main() {
+    unsafe {
+        llvm_asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
+    }
+}