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: internal compiler error: InvertFlags should never make it to codegen v100 = InvertFlags v123 #62469

Closed
TheRook opened this issue Sep 6, 2023 · 4 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@TheRook
Copy link

TheRook commented Sep 6, 2023

What version of Go are you using (go version)?

$ go version
go version go1.21.0 darwin/arm64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH='arm64'

What did you do?

go get github.com/azr/phash
go build

What did you expect to see?

clean build, worked on 1.20.0

What did you see instead?

github.com/azr/phash/geometry/triangle

./go/pkg/mod/github.com/azr/phash@v0.2.0/geometry/triangle/triangle.go:38:12: internal compiler error: '(*Triangle).HasPoint': InvertFlags should never make it to codegen v100 = InvertFlags v123

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new

@seankhliao seankhliao changed the title affected/package: github.com/azr/phash@v0.2.0 cmd/compile: internal compiler error: InvertFlags should never make it to codegen v100 = InvertFlags v123 Sep 6, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 6, 2023
@mknyszek mknyszek added this to the Backlog milestone Sep 6, 2023
@randall77
Copy link
Contributor

Smaller reproducer:

package main

func sign(p1, p2, p3 Point) bool {
	return (p1.X-p3.X)*(p2.Y-p3.Y)-(p2.X-p3.X)*(p1.Y-p3.Y) < 0
}

type Point struct {
	X, Y int
}

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/526276 mentions this issue: cmd/compile: absorb InvertFlags into Noov comparisons

@randall77
Copy link
Contributor

@gopherbot please open a backport issue for 1.21.

@gopherbot
Copy link
Contributor

Backport issue(s) opened: #62506 (for 1.21).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

5 participants
@TheRook @mknyszek @randall77 @gopherbot and others