compiler: avoid negative zero in float constants
commitd1d4ace3ab8f98ecf639d2c8224a316f9eb9ac3c
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Feb 2018 15:30:06 +0000 (6 15:30 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Feb 2018 15:30:06 +0000 (6 15:30 +0000)
tree4d375844ea14bdf771954d9e232206931c69405e
parent67167e0d9df2d6ebbfb7cae357ce190e39b54fd4
compiler: avoid negative zero in float constants

    Check for negative numbers with very small magnitudes that will round
    to negative zero, and force them to positive zero instead.

    This implements the spec clarification in https://golang.org/cl/14727.
    The test is in https://golang.org/cl/91895.

    Fixes golang/go#12621

    Reviewed-on: https://go-review.googlesource.com/92175

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257415 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/expressions.h