Bug: no free registers for temporary #47

Closed
opened 2026-09-24 22:16:55 +00:00 by Furkan · 1 comment

Register spilling is not working for this samplecode

main() {
	a0 := 0
	a1 := 0
	a2 := 0
	a3 := 0
	a4 := 0
	a5 := 0
	a6 := 0 // 7th variable triggers compiler panic

	loop i := 0..2 {
		a0 += 1
		a1 += 1
		a2 += 1
		a3 += 1
		a4 += 1
		a5 += 1
		a6 += 1
	}

	assert a0 == 2
	assert a6 == 2
}

Register spilling is not working for this samplecode ``` main() { a0 := 0 a1 := 0 a2 := 0 a3 := 0 a4 := 0 a5 := 0 a6 := 0 // 7th variable triggers compiler panic loop i := 0..2 { a0 += 1 a1 += 1 a2 += 1 a3 += 1 a4 += 1 a5 += 1 a6 += 1 } assert a0 == 2 assert a6 == 2 } ```
ed self-assigned this 2026-09-25 07:25:01 +00:00
Owner

Fixed in 6251123893.

Fixed in https://git.urbach.dev/cli/q/commit/6251123893e462754232589ee216f9aa7ceb704c.
ed added spent time 2026-09-25 08:32:18 +00:00
1 hour
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Total time spent: 1 hour
ed
1 hour
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cli/q#47
No description provided.