compiler: avoid negative zero in float constants
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 5 Feb 2018 15:28:59 +0000 (15:28 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 5 Feb 2018 15:28:59 +0000 (15:28 +0000)
commit354bbdb6bac8630e8f3e14d85ce9451eca8cf2a8
treeb35c958fa28f08c28032e35dd056af7d988acc37
parent5f25b464a8e3935b9b1bd47e6b652e79d4824102
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/91915

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