compiler: Report errors from very large types.
authorChris Manghane <cmang@google.com>
Thu, 10 Sep 2015 18:24:28 +0000 (18:24 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 10 Sep 2015 18:24:28 +0000 (18:24 +0000)
commitec23e5b3950ab5a907aecdb0860340b86702ed13
treec3d6323633f32f5fef3f497f47e7bb3718941bd3
parent8b661145105bf5d8d7be3f2e57b51c8b8d2c27b7
compiler: Report errors from very large types.

    The gcc backend throws an internal error when trying to get the size
    of a type which is larger than the amount of address space on the
    machine.  This patch catches this error and reports it in a user
    friendly way.

    Fixes golang/go#11554.

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

* go-gcc.cc (Gcc_backend::type_size): Return -1 for
unrepresentable size.

From-SVN: r227656
gcc/go/ChangeLog
gcc/go/go-gcc.cc
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/types.cc