cmd/compile/internal/gc: rename Fatal to Fatalf
This helps vet see a real issue:
cmd/internal/gc$ go vet
gen.go:1223: unreachable code
Fixes #12106.
Change-Id: I720868b07ae6b6d5a4dc6b238baa8c9c889da6d8
Reviewed-on: https://go-review.googlesource.com/14083
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/cmd/compile/internal/gc/bv.go b/src/cmd/compile/internal/gc/bv.go
index 2b988e6..b40339e 100644
--- a/src/cmd/compile/internal/gc/bv.go
+++ b/src/cmd/compile/internal/gc/bv.go
@@ -65,7 +65,7 @@
func bvcmp(bv1 Bvec, bv2 Bvec) int {
if bv1.n != bv2.n {
- Fatal("bvequal: lengths %d and %d are not equal", bv1.n, bv2.n)
+ Fatalf("bvequal: lengths %d and %d are not equal", bv1.n, bv2.n)
}
for i, x := range bv1.b {
if x != bv2.b[i] {
@@ -98,7 +98,7 @@
func bvget(bv Bvec, i int32) int {
if i < 0 || i >= bv.n {
- Fatal("bvget: index %d is out of bounds with length %d\n", i, bv.n)
+ Fatalf("bvget: index %d is out of bounds with length %d\n", i, bv.n)
}
return int((bv.b[i>>WORDSHIFT] >> uint(i&WORDMASK)) & 1)
}
@@ -174,7 +174,7 @@
func bvreset(bv Bvec, i int32) {
if i < 0 || i >= bv.n {
- Fatal("bvreset: index %d is out of bounds with length %d\n", i, bv.n)
+ Fatalf("bvreset: index %d is out of bounds with length %d\n", i, bv.n)
}
mask := uint32(^(1 << uint(i%WORDBITS)))
bv.b[i/WORDBITS] &= mask
@@ -188,7 +188,7 @@
func bvset(bv Bvec, i int32) {
if i < 0 || i >= bv.n {
- Fatal("bvset: index %d is out of bounds with length %d\n", i, bv.n)
+ Fatalf("bvset: index %d is out of bounds with length %d\n", i, bv.n)
}
mask := uint32(1 << uint(i%WORDBITS))
bv.b[i/WORDBITS] |= mask