compiler: don't use predeclared location for implicit runtime import
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 9 Sep 2019 19:41:05 +0000 (19:41 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 9 Sep 2019 19:41:05 +0000 (19:41 +0000)
commitb7f55c8e35981c5f2cb7c65d7d69f58e02ab0bcd
tree0c66de448e004c928c6b138b17ca7d331c73e72d
parent4f0eaba24dfb46dd4b45251231fdf006a70888c5
compiler: don't use predeclared location for implicit runtime import

    For the main package we add an implicit import of the runtime package,
    to ensure that it is initialized.  That import used the predeclared
    location, which caused various tests, notably Named_type::is_builtin,
    to treat these imported names as builtin.  Start using a real location,
    so that those tests do the right thing.

    By the way, this implicit import is a partial cause of golang/go#19773.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194337

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