Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: incorrect comparison folding #41872

Closed
randall77 opened this issue Oct 8, 2020 · 1 comment
Closed

cmd/compile: incorrect comparison folding #41872

randall77 opened this issue Oct 8, 2020 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@randall77
Copy link
Contributor

package main

//go:noinline
func f(x int32) bool {
	return byte(x&0xc0) == 64
}

func main() {
	if !f(64) {
		panic("wanted true, got false")
	}
}

Shouldn't panic. It does at tip.

@gopherbot
Copy link

Change https://golang.org/cl/260701 mentions this issue: cmd/compile: fix incorrect comparison folding

@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 8, 2020
@dmitshur dmitshur added this to the Go1.16 milestone Oct 8, 2020
@golang golang locked and limited conversation to collaborators Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants