compiler: avoid crashing on bad self-referential type
commitfbabafbdae9a9f20405f95b15df519d27a526ef1
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Mar 2018 19:56:14 +0000 (1 19:56 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Mar 2018 19:56:14 +0000 (1 19:56 +0000)
tree642557ee91807bd6032e46f1e207e9ca9f92ddb7
parent7e178fa3f0697843e273c2e1101052957352f0ea
compiler: avoid crashing on bad self-referential type

    The compiler was crashing partway through emitting an error for a bad
    self-referential struct type (which refers to one of its own fields
    via an unsafe.Offset expression). Tweak the offset logic to check for
    this class of type error and exit cleanly.

    Fixes golang/go#24180

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

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