diff options
author | Russ Cox <rsc@golang.org> | 2010-06-23 10:55:50 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-06-23 10:55:50 -0400 |
commit | 3b43d32ad60104619f13cf98f8724dedbfc6ce0a (patch) | |
tree | 07bdfb6239e74233cf56001236761e0f13398a1f /test | |
parent | 989fa5b9944feb496a068d0fb0e49c72cc2d6f11 (diff) | |
download | golang-3b43d32ad60104619f13cf98f8724dedbfc6ce0a.tar.gz |
gc: fix crash for nested complex division
R=ken2
CC=golang-dev
http://codereview.appspot.com/1720043
Diffstat (limited to 'test')
-rw-r--r-- | test/ken/cplx4.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ken/cplx4.go b/test/ken/cplx4.go index c9ba2e9b9..d55d6a6e3 100644 --- a/test/ken/cplx4.go +++ b/test/ken/cplx4.go @@ -35,4 +35,10 @@ func main() { // real, imag, cmplx c3 := cmplx(real(c2)+3, imag(c2)-5) + c2 fmt.Printf("c = %G\n", c3) + + // compiler used to crash on nested divide + c4 := cmplx(real(c3/2), imag(c3/2)) + if c4 != c3/2 { + fmt.Printf("c3 = %G != c4 = %G\n", c3, c4) + } } |