compiler: clean up unresolved placeholders for pointer types
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 25 Jul 2017 22:54:23 +0000 (22:54 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 25 Jul 2017 22:54:23 +0000 (22:54 +0000)
commit08327dfa73c3cc2daf15a0c4405ae1bcfa940ef3
treed45157c11b96e49a3175cd09161923fe1925180c
parentc2830789baaa2c6fd41adcc2c02a757ab59c843c
compiler: clean up unresolved placeholders for pointer types

    Add a new helper routine Type::finish_pointer_types that walks through
    the pointer type cache and looks for placeholder types that may have
    been created at some point before conversion of named types, and
    invokes Type::finish_backend() on said placeholders.  This is needed
    to handle cases where the compiler manufactures a pointer type as part
    of lowering, then a placeholder is created for it due to a call to
    Type::backend_type_size(), but there is no explicit reference to the
    type in user code.

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

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