]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/ssa/gen: fix error message for wrong arg length
authorCherry Zhang <cherryyz@google.com>
Wed, 7 Sep 2016 16:06:43 +0000 (12:06 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 8 Sep 2016 16:28:02 +0000 (16:28 +0000)
When arg length is wrong, op is not set, so it always prints
"should have 0 args".

Change-Id: If7bcb41d993919d0038d2a09e16188c79dfbd858
Reviewed-on: https://go-review.googlesource.com/28831
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/rulegen.go

index afe17469ae052e285b91a7a7217a7261640e6ac0..f255f6ba3fd1671119f274067811c91b6d65ab01 100644 (file)
@@ -616,7 +616,7 @@ func parseValue(val string, arch arch, loc string) (op opData, oparch string, ty
                        if strict {
                                return false
                        } else {
-                               log.Printf("%s: op %s (%s) should have %d args, has %d", loc, s[0], archname, op.argLength, len(args))
+                               log.Printf("%s: op %s (%s) should have %d args, has %d", loc, s[0], archname, x.argLength, len(args))
                        }
                }
                return true