1
0
mirror of https://github.com/golang/go synced 2024-11-23 20:00:04 -07:00

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

Change-Id: Ibb15282a2baeb58439b085d70b82797d8c71de36
Reviewed-on: https://go-review.googlesource.com/16502
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Robert Griesemer 2015-10-29 14:46:47 -07:00
parent b41a920792
commit ddbc802b07

View File

@ -1535,7 +1535,7 @@ casei:
mpatoflt(&yylval.val.U.(*Mpcplx).Imag, str) mpatoflt(&yylval.val.U.(*Mpcplx).Imag, str)
if yylval.val.U.(*Mpcplx).Imag.Val.IsInf() { if yylval.val.U.(*Mpcplx).Imag.Val.IsInf() {
Yyerror("overflow in imaginary constant") 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 { if Debug['x'] != 0 {