compiler: Check the type in function declarations.
commit6d696111e8ee6a1915427ee7ea8ea8fadd7f4f4f
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 Jul 2015 22:16:12 +0000 (31 22:16 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 Jul 2015 22:16:12 +0000 (31 22:16 +0000)
tree8ba8d7038b89a56101535a903784fc22051f9b5d
parent8289950201d1210dac5d110f1b394946450e6ed3
compiler: Check the type in function declarations.

    Function declarations don't create a block where the variables listed
    in the parameter list are declared.  Because there are no variables
    declared, the types of the parameter variables is unchecked, allowing
    for invalid values to be used as the type.  This patch adds a special
    case to the check_types pass for function declarations.

    Fixes golang/go#11567.

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

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