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 error on complex comparison #32723

Open
gazerro opened this issue Jun 21, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@gazerro
Copy link

commented Jun 21, 2019

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

$ go version
go version devel +44c9354c5a Fri Jun 21 05:21:30 2019 +0000 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What did you do?

_ = 1i < 2i

https://play.golang.org/p/syOtlxxmrya

What did you expect to see?

invalid operation: 1i < 2i (operator < not defined on complex128)

What did you see instead?

internal compiler error: compareOp: bad comparison: 1i < 2i

@agnivade

This comment has been minimized.

Copy link
Member

commented Jun 21, 2019

Not a regression from 1.12. So adding to 1.14.

And seems to happen only while directly comparing literals. If I compare complex variables, I get the correct error.

@agnivade agnivade added this to the Go1.14 milestone Jun 21, 2019

@agnivade agnivade changed the title cmd/compiler: internal error on complex comparison cmd/compile: internal error on complex comparison Jun 21, 2019

@gopherbot

This comment has been minimized.

Copy link

commented Jun 24, 2019

Change https://golang.org/cl/183459 mentions this issue: cmd/compile: fix internal error on complex comparison

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.