compiler: Flatten erroneous subtrees into errors.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Aug 2015 01:04:42 +0000 (01:04 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Aug 2015 01:04:42 +0000 (01:04 +0000)
commit5bf8be8b9f5762d6b04f2144e9336ea701d2e19f
treea38ed0948a185084f013a359229cd87e97988d28
parentd1bf727bd1e71ffddc1a37c36060595d8e4fde74
compiler: Flatten erroneous subtrees into errors.

    Between the lowering and flattening passes of the compiler, there are
    several passes that modify the lowered Go parse tree and as errors are
    discovered, several nodes transform into error nodes.  However, for a
    higher level node such as a construction expression, the erroneous
    nodes in the subtrees might not propagate their error.  The flatten
    phase for a node now looks for errors in the subtree and flattens the
    node into an error node if any are found.

    Fixes golang/go#11559, golang/go#11536, golang/go#11558.

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

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