diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-12-15 22:47:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-12-15 22:47:43 +0000 |
commit | 62afb87d9c466ab33767fad6d74133a4ad925f52 (patch) | |
tree | 59845f6dec919b79bac4beebf830fee954ad3678 /gcc/vec.h | |
parent | 7cdb6e4c68a6dacee2308e6e9a8533a0104471d7 (diff) | |
download | gcc-62afb87d9c466ab33767fad6d74133a4ad925f52.zip gcc-62afb87d9c466ab33767fad6d74133a4ad925f52.tar.gz gcc-62afb87d9c466ab33767fad6d74133a4ad925f52.tar.bz2 |
re PR go/78763 (go1: internal compiler error: in do_get_backend, at go/gofrontend/expressions.cc:8352)
PR go/78763
compiler: call determine_types even for constant expressions
We need to call determine_types even for constant expressions, since a
constant expression may include code like unsafe.Sizeof(0). Something
needs to determine the type of the untyped 0, and that should be the
determine_types pass.
Implementing that triggered a compiler crash on test/const1.go because
it permitted some erroneous constants to make it all the way to the
backend. Catch that case by checking whether we get a constant
overflow error, and marking the expression invalid if we do. This is
a good change in any case, as previously we reported the same constant
overflow error multiple times, and now we only report it once.
Fixes GCC PR 78763.
Reviewed-on: https://go-review.googlesource.com/34496
From-SVN: r243729
Diffstat (limited to 'gcc/vec.h')
0 files changed, 0 insertions, 0 deletions