aboutsummaryrefslogtreecommitdiff
path: root/test/loopbce.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2025-11-24 15:00:11 -0500
committerDavid Chase <drchase@google.com>2025-11-24 15:49:12 -0800
commit62cd044a79b9f2ba889bca59b3b12400dc41dd85 (patch)
treea120624e15b2a31014cc6e215a48cefbecf3fe99 /test/loopbce.go
parentf1e376f342af82d6f5bdba23cdc5c35b5bfd9064 (diff)
downloadgo-62cd044a79b9f2ba889bca59b3b12400dc41dd85.tar.xz
cmd/compile: add cases for StringLen to prove
Tricky index-offset logic had been added for slices, but not for strings. This fixes that, and also adds tests for same behavior in string/slice cases, and adds a new test for code in prove that had been added but not explicitly tested. Fixes #76270. Change-Id: Ibd92b89e944d86b7f30b4486a9008e6f1ac6af7d Reviewed-on: https://go-review.googlesource.com/c/go/+/723980 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'test/loopbce.go')
-rw-r--r--test/loopbce.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/loopbce.go b/test/loopbce.go
index 8a58d94236..aabd56c682 100644
--- a/test/loopbce.go
+++ b/test/loopbce.go
@@ -420,7 +420,7 @@ func nobce2(a string) {
useString(a[i:]) // ERROR "Proved IsSliceInBounds$"
}
for i := int64(0); i < int64(len(a))-31337; i++ { // ERROR "Induction variable: limits \[0,\?\), increment 1$"
- useString(a[i:]) // ERROR "Proved IsSliceInBounds$"
+ useString(a[i:]) // ERROR "Proved IsSliceInBounds$" "Proved slicemask not needed"
}
for i := int64(0); i < int64(len(a))+int64(-1<<63); i++ { // ERROR "Disproved Less64$" "Induction variable: limits \[0,\?\), increment 1$"
useString(a[i:])