]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: remove constant arithmetic overflows during typecheck
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 4 Feb 2023 05:00:20 +0000 (12:00 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 9 Feb 2023 09:33:47 +0000 (09:33 +0000)
commitfd208c8850cdfe84469d3e4ef9bd55e2e0cece70
tree08c3d031dc57844e84a8db6b09aaf223878fd458
parent8fb9565832e6dbacaaa057ffabc251a9341f8d23
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 #58293

Change-Id: I6f0049a69bdb0a8d0d7a0db49c7badaa92598ea2
Reviewed-on: https://go-review.googlesource.com/c/go/+/465096
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@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]