]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix error message wording
authorRuss Cox <rsc@golang.org>
Tue, 22 Nov 2022 18:27:16 +0000 (13:27 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 23 Nov 2022 19:34:12 +0000 (19:34 +0000)
CL 450136 fixed a different copy of this error but missed this one.

With the compiler fix from CL 451555 rolled back to produce the error,
this is the text before this CL:

b.go:9:15: internal compiler error: 'init': Value live at entry. It shouldn't be. func init, node a.i, value nil

And this CL changes it to:

b.go:9:15: internal compiler error: 'init': value a.i (nil) incorrectly live at entry

matching the same change in the earlier CL.

Change-Id: I33e6b91477e1a213a6918c3ebdea81273be7d235
Reviewed-on: https://go-review.googlesource.com/c/go/+/452816
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/ssagen/ssa.go

index c6d6e0deeef24e42c701c420fb914d590fdcfcbd..aec826dc274e26b130c802da1371672d84a0af46 100644 (file)
@@ -6525,7 +6525,7 @@ func (s *state) variable(n ir.Node, t *types.Type) *ssa.Value {
 
        if s.curBlock == s.f.Entry {
                // No variable should be live at entry.
-               s.Fatalf("Value live at entry. It shouldn't be. func %s, node %v, value %v", s.f.Name, n, v)
+               s.f.Fatalf("value %v (%v) incorrectly live at entry", n, v)
        }
        // Make a FwdRef, which records a value that's live on block input.
        // We'll find the matching definition as part of insertPhis.