summaryrefslogtreecommitdiffstats
path: root/tests/ui/asm/issue-87802.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/asm/issue-87802.rs')
-rw-r--r--tests/ui/asm/issue-87802.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/asm/issue-87802.rs b/tests/ui/asm/issue-87802.rs
new file mode 100644
index 000000000..5b2e636c2
--- /dev/null
+++ b/tests/ui/asm/issue-87802.rs
@@ -0,0 +1,20 @@
+// needs-asm-support
+// ignore-nvptx64
+// ignore-spirv
+// ignore-wasm32
+// Make sure rustc doesn't ICE on asm! when output type is !.
+
+use std::arch::asm;
+
+fn hmm() -> ! {
+ let x;
+ unsafe {
+ asm!("/* {0} */", out(reg) x);
+ //~^ ERROR cannot use value of type `!` for inline assembly
+ }
+ x
+}
+
+fn main() {
+ hmm();
+}