compiler: avoid negative zero in float constants
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 6 Feb 2018 15:30:06 +0000 (15:30 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 6 Feb 2018 15:30:06 +0000 (15:30 +0000)
commit3e12b42be93c14a599df9c96e58ba66cd864bf77
tree4d375844ea14bdf771954d9e232206931c69405e
parent3ca8e91f0e4452f618dbdc82090ecf47d1bd984c
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

From-SVN: r257415
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/expressions.h