diff options
| author | Russ Cox <rsc@golang.org> | 2015-11-04 15:47:48 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-11-16 20:48:47 +0000 |
| commit | 2c11164db52bca183da4c3ac09ceac7565835d53 (patch) | |
| tree | 4eff4510f35897bbf60983e211b7cda3ed2745a5 /src | |
| parent | 292ad592913e3143a7b4db8ddb0513aea3020e2b (diff) | |
| download | go-2c11164db52bca183da4c3ac09ceac7565835d53.tar.xz | |
cmd/compile: fix value range check for complex constants
Fixes #11590.
Change-Id: I4144107334604a2cc98c7984df3b5d4cde3d30af
Reviewed-on: https://go-review.googlesource.com/16920
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/compile/internal/gc/const.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go index 6fe249f171..03c52a078c 100644 --- a/src/cmd/compile/internal/gc/const.go +++ b/src/cmd/compile/internal/gc/const.go @@ -259,7 +259,6 @@ func convlit1(np **Node, t *Type, explicit bool) { n.SetVal(toint(n.Val())) fallthrough - // flowthrough case CTINT: overflow(n.Val(), t) } @@ -272,7 +271,6 @@ func convlit1(np **Node, t *Type, explicit bool) { n.SetVal(toflt(n.Val())) fallthrough - // flowthrough case CTFLT: n.SetVal(Val{truncfltlit(n.Val().U.(*Mpflt), t)}) } @@ -283,6 +281,7 @@ func convlit1(np **Node, t *Type, explicit bool) { case CTFLT, CTINT, CTRUNE: n.SetVal(tocplx(n.Val())) + fallthrough case CTCPLX: overflow(n.Val(), t) |
