compiler: avoid crash on erroneous type
commit70963bc983a61a61275aa07ed2839fe21ff588bb
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Jun 2017 23:42:53 +0000 (14 23:42 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Jun 2017 23:42:53 +0000 (14 23:42 +0000)
treeb5046d7e4b60ff1ae9c5a213b054d41dc1cd4f70
parent77ec2381f10d8a510a0bc21fbdd6a40cba4ed123
compiler: avoid crash on erroneous type

    If there is an error constructing the backend type, the GCC backend
    will report that the size is 1.  That will then cause construction of
    the ptrmask to crash.  Avoid that case by just generating an empty
    ptrmask.

    Noticed while compiling a broken package.  The policy I've been
    following is to not commit a test case for a compiler crash on invalid
    code, so no test case.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249208 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/types.cc