diff options
author | Wayne Zuo <wdvxdr@golangcn.org> | 2022-06-05 13:22:29 +0800 |
---|---|---|
committer | Daniel Martà <mvdan@mvdan.cc> | 2022-08-31 09:35:45 +0000 |
commit | 3680b5e9c4f42fcf9155aa42b3b344d1fbe19571 (patch) | |
tree | 6263e38f78d2b2da33fc202647956b4f35acb7b5 /test/prove.go | |
parent | d2e0587f77e1cbbd5c7966242c85edba83b37157 (diff) | |
download | go-3680b5e9c4f42fcf9155aa42b3b344d1fbe19571.tar.gz go-3680b5e9c4f42fcf9155aa42b3b344d1fbe19571.zip |
cmd/compile: teach prove about bitwise OR operation
Fixes #45928.
Change-Id: Ifbb0effbca4ab7c0eb56069fee40edb564553c35
Reviewed-on: https://go-review.googlesource.com/c/go/+/410336
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'test/prove.go')
-rw-r--r-- | test/prove.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/prove.go b/test/prove.go index 5ccaff54ce..1be257f206 100644 --- a/test/prove.go +++ b/test/prove.go @@ -1053,6 +1053,11 @@ func issue51622(b []byte) int { return 0 } +func issue45928(x int) { + combinedFrac := (x) / (x | (1 << 31)) // ERROR "Proved Neq64$" + useInt(combinedFrac) +} + //go:noinline func useInt(a int) { } |