]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.20] cmd/compile: remove constant arithmetic overflows during...
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 4 Feb 2023 05:00:20 +0000 (12:00 +0700)
committerDavid Chase <drchase@google.com>
Thu, 9 Feb 2023 17:09:03 +0000 (17:09 +0000)
commit7302f83d8733203aa23f056690d20a4adb949424
tree5203cc38f5602049cab18fa65f6846ef3c5f91da
parentde4748c47c67392a57f250714509f590f68ad395
[release-branch.go1.20] cmd/compile: remove constant arithmetic overflows during typecheck

Since go1.19, these errors are already reported by types2 for any user's
Go code. Compiler generated code, which looks like constant expression
should be evaluated as non-constant semantic, which allows overflows.

Fixes #58319

Change-Id: I6f0049a69bdb0a8d0d7a0db49c7badaa92598ea2
Reviewed-on: https://go-review.googlesource.com/c/go/+/466676
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
src/cmd/compile/internal/typecheck/const.go
test/fixedbugs/issue58293.go [new file with mode: 0644]