/ go Public
cmd/compile: unneeded bounds checks #34816
Issues related to the Go compiler and/or runtime.
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
Does this issue reproduce with the latest release?
What did you do?
I compiled the following functions to check if there were any bounds checks: https://godbolt.org/z/RSrNwR.
What did you expect to see?
I expected to see no bounds checks.
What did you see instead?
Instead, I see 7 different bounds checks generated by the Go compiler (highlighted in the site above).
I talked with @zdjones about this and it appears like all these bounds checks can be removed.
The text was updated successfully, but these errors were encountered: