Partially undefined phi values cause a panic #32

Closed
opened 2025-09-01 16:26:21 +00:00 by Furkan · 1 comment
main() {
	x := 0
	y := 0

	loop {
		if true {
			return
		}

		x1 := x
		y2 := y
	}
}

panic: interface conversion: *ssa.Phi is not ssa.HasSource: missing method End

goroutine 36 [running]:
git.urbach.dev/cli/q/src/core.(*Function).removeDeadCode(0xc00029e000, 0x0)
C:/Furkan/Dev/q/src/core/removeDeadCode.go:56 +0x27a

``` main() { x := 0 y := 0 loop { if true { return } x1 := x y2 := y } } ``` panic: interface conversion: *ssa.Phi is not ssa.HasSource: missing method End goroutine 36 [running]: git.urbach.dev/cli/q/src/core.(*Function).removeDeadCode(0xc00029e000, 0x0) C:/Furkan/Dev/q/src/core/removeDeadCode.go:56 +0x27a
ed self-assigned this 2025-09-01 17:38:48 +00:00
ed changed title from Phi Error to Partially undefined phi values cause a panic 2025-09-01 18:31:15 +00:00
Owner

Thanks for the report!
Fixed in cli/q@a083d0806b.

Thanks for the report! Fixed in https://git.urbach.dev/cli/q/commit/a083d0806b2d809b57e1e860962f2125bd3f0099.
ed added spent time 2025-09-03 09:09:39 +00:00
2 hours
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 2 hours
ed
2 hours
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#32
No description provided.