compiler: Report errors after evaluating invalid constant.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 20 Oct 2015 20:44:23 +0000 (20:44 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 20 Oct 2015 20:44:23 +0000 (20:44 +0000)
commit0e993e397753503c774c5b411db231b7a8fa1990
tree7686f63e206673ae55eb2c533d60d9f6d2f58f00
parent28c64f64a40843a5951225a2c5949f21a6bc15b4
compiler: Report errors after evaluating invalid constant.

    The fix for golang/go#11541 made the assertion that getting an invalid
    Numeric_constant after evaluating an invalid constant must result in
    an error in a binary expression.  However, a Numeric_constant can be
    invalid if it is unset, which occurs when either operand cannot be
    converted to the right type.  These errors are issued after the
    Numeric_constant is lowered.

    Fixes golang/go#12615.

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

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