cmd/compile: detect divisions that always result in 0 #25733
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Performance
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version devel +b7f3c178a3 Mon May 14 04:42:45 2018 +0000 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?darwin/amd64
What did you do?
What did you expect to see?
Something akin to
What did you see instead?
The value of q is in the range [0-6) because of the modulo, which divided by 9 is always 0. So the result of
f(x, y)
is alwaysx
The text was updated successfully, but these errors were encountered: