Commit ddbc802b authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile/internal/gc: fix complex literal overflow

Change-Id: Ibb15282a2baeb58439b085d70b82797d8c71de36
Reviewed-on: https://go-review.googlesource.com/16502Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent b41a9207
......@@ -1535,7 +1535,7 @@ casei:
mpatoflt(&yylval.val.U.(*Mpcplx).Imag, str)
if yylval.val.U.(*Mpcplx).Imag.Val.IsInf() {
Yyerror("overflow in imaginary constant")
Mpmovecflt(&yylval.val.U.(*Mpcplx).Real, 0.0)
Mpmovecflt(&yylval.val.U.(*Mpcplx).Imag, 0.0)
}
if Debug['x'] != 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment