compiler: Avoid knock-on errors with impossibly large types.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 26 Jan 2016 22:35:20 +0000 (22:35 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 26 Jan 2016 22:35:20 +0000 (22:35 +0000)
commita54d45c593ccadcd9ea99bb6ad66a7f7de91f855
tree9ed10d3f86c009a9d7a6a5f5809193047cb3c303
parent8dfdb4191221f83f15fa9c1ec8b55182d56b8d4c
compiler: Avoid knock-on errors with impossibly large types.

    The gofrontend asks the backend compiler for the architecture
    appropriate size of a given type.  For array types, it is possible
    to construct a type too large to fit on the machine.  This patch does
    two things: 1. When an impossibly large type is encountered, we mark
    the type as erroneous and later calls to discover the size of that
    type are short-circuited. 2. When generating the GC symbol data for
    an impossibly large array of arrays, we avoid generating symbol data
    as soon as we find an array that is too large to be expressed.

    Fixes golang/go#12938.

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

From-SVN: r232855
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/types.cc