diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go index cbb9c2ee08c..8d841b94ddf 100644 --- a/src/cmd/compile/internal/gc/const.go +++ b/src/cmd/compile/internal/gc/const.go @@ -1344,6 +1344,8 @@ func defaultlitreuse(n *Node, t *types.Type, reuse canReuseNode) *Node { default: yyerror("defaultlit: unknown literal: %v", n) } + lineno = lno + return n case CTxxx: Fatalf("defaultlit: idealkind is CTxxx: %+v", n) @@ -1354,28 +1356,19 @@ func defaultlitreuse(n *Node, t *types.Type, reuse canReuseNode) *Node { t1 = t } n = convlit1(n, t1, false, reuse) + lineno = lno + return n case CTINT: t1 = types.Types[TINT] - goto num - case CTRUNE: t1 = types.Runetype - goto num - case CTFLT: t1 = types.Types[TFLOAT64] - goto num - case CTCPLX: t1 = types.Types[TCOMPLEX128] - goto num } - lineno = lno - return n - -num: // Note: n.Val().Ctype() can be CTxxx (not a constant) here // in the case of an untyped non-constant value, like 1<= 0 { if c.instoffset == 0 { return C_ZCON diff --git a/src/cmd/internal/obj/mips/obj0.go b/src/cmd/internal/obj/mips/obj0.go index 73026b46eaa..697b2b7acb6 100644 --- a/src/cmd/internal/obj/mips/obj0.go +++ b/src/cmd/internal/obj/mips/obj0.go @@ -878,21 +878,20 @@ func (c *ctxt0) sched(p0, pe *obj.Prog) { t = sch[j:] if t[0].comp { if s[0].p.Mark&BRANCH != 0 { - goto no2 + continue } } if t[0].p.Mark&DELAY != 0 { if -cap(s) >= -cap(se) || conflict(&t[0], &s[1]) { - goto no2 + continue } } for u := t[1:]; -cap(u) <= -cap(s); u = u[1:] { if c.depend(&u[0], &t[0]) { - goto no2 + continue } } goto out2 - no2: } if s[0].p.Mark&BRANCH != 0 { diff --git a/src/cmd/internal/obj/ppc64/asm9.go b/src/cmd/internal/obj/ppc64/asm9.go index 72738f1967e..cf27a49cd03 100644 --- a/src/cmd/internal/obj/ppc64/asm9.go +++ b/src/cmd/internal/obj/ppc64/asm9.go @@ -844,13 +844,11 @@ func (c *ctxt9) aclass(a *obj.Addr) int { return C_DACON } - goto consize - case obj.NAME_EXTERN, obj.NAME_STATIC: s := a.Sym if s == nil { - break + return C_GOK } c.instoffset = a.Offset @@ -871,11 +869,11 @@ func (c *ctxt9) aclass(a *obj.Addr) int { return C_SACON } return C_LACON + + default: + return C_GOK } - return C_GOK - - consize: if c.instoffset >= 0 { if c.instoffset == 0 { return C_ZCON diff --git a/src/cmd/internal/obj/s390x/asmz.go b/src/cmd/internal/obj/s390x/asmz.go index 761cdc56379..52cfc0e1e68 100644 --- a/src/cmd/internal/obj/s390x/asmz.go +++ b/src/cmd/internal/obj/s390x/asmz.go @@ -570,13 +570,12 @@ func (c *ctxtz) aclass(a *obj.Addr) int { } return C_DACON } - goto consize case obj.NAME_EXTERN, obj.NAME_STATIC: s := a.Sym if s == nil { - break + return C_GOK } c.instoffset = a.Offset @@ -605,11 +604,11 @@ func (c *ctxtz) aclass(a *obj.Addr) int { return C_SACON } return C_LACON + + default: + return C_GOK } - return C_GOK - - consize: if c.instoffset == 0 { return C_ZCON }