compiler: Check the type in function declarations.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 31 Jul 2015 22:16:12 +0000 (22:16 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 31 Jul 2015 22:16:12 +0000 (22:16 +0000)
commit04628a1d33dca0c560af130475458313507cf9aa
tree8ba8d7038b89a56101535a903784fc22051f9b5d
parent3176040661d29d245759c8c686e247c35f305823
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

From-SVN: r226456
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h