We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
become
1 parent 9312cd6 commit ddebb62Copy full SHA for ddebb62
tests/assembly-llvm/tail-call-infinite-recursion.rs
@@ -0,0 +1,21 @@
1
+//@ add-minicore
2
+//@ assembly-output: emit-asm
3
+//@ compile-flags: --target x86_64-unknown-linux-gnu -Copt-level=0 -Cllvm-args=-x86-asm-syntax=intel
4
+//@ needs-llvm-components: x86
5
+#![expect(incomplete_features)]
6
+#![feature(no_core, explicit_tail_calls)]
7
+#![crate_type = "lib"]
8
+#![no_core]
9
+
10
+extern crate minicore;
11
+use minicore::*;
12
13
+// Test that an infinite loop via guaranteed tail calls does not blow the stack.
14
15
+// CHECK-LABEL: inf
16
+// CHECK: mov rax, qword ptr [rip + inf@GOTPCREL]
17
+// CHECK: jmp rax
18
+#[unsafe(no_mangle)]
19
+fn inf() -> ! {
20
+ become inf()
21
+}
0 commit comments