File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 22// Without storing source locations relative to the owner decl, the compile error
33// here would be off by 2 bytes (from the "7" -> "999").
44pub fn main () void {
5+ {
6+ // Waste some of our backward branch quota, to avoid blowing the stack of the compiler
7+ // until https://github.com/ziglang/zig/issues/12973 is fixed
8+ comptime var i : usize = 0 ;
9+ inline while (i < 900 ) : (i += 1 ) {}
10+ }
511 const y = fibonacci (999 );
612 if (y - 21 != 0 ) unreachable ;
713}
@@ -13,8 +19,7 @@ inline fn fibonacci(n: usize) usize {
1319
1420// error
1521//
16- // :11:21: error: evaluation exceeded 1000 backwards branches
17- // :11:21: note: use @setEvalBranchQuota() to raise the branch limit from 1000
18- // :11:40: note: called from here (6 times)
19- // :11:21: note: called from here (495 times)
20- // :5:24: note: called from here
22+ // :17:21: error: evaluation exceeded 1000 backwards branches
23+ // :17:21: note: use @setEvalBranchQuota() to raise the branch limit from 1000
24+ // :17:21: note: called from here (99 times)
25+ // :11:24: note: called from here
You can’t perform that action at this time.
0 commit comments