diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-02-10 22:35:32 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-02-10 22:35:32 +0000 |
commit | 6df1f72e94e2d66a56952b541d66739e5f43165b (patch) | |
tree | 45ee38d86ef1ea7fdb3ebe2e7b4432a856ff98c2 /gcc | |
parent | a14dd08adf1e1a3deaf6baf1ffdf55f8143f00f9 (diff) | |
download | gcc-6df1f72e94e2d66a56952b541d66739e5f43165b.zip gcc-6df1f72e94e2d66a56952b541d66739e5f43165b.tar.gz gcc-6df1f72e94e2d66a56952b541d66739e5f43165b.tar.bz2 |
Determine types in global variable preinit blocks.
From-SVN: r170025
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/gogo.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index aa66cf4..e3c56b6 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -3357,6 +3357,9 @@ Variable::type() const void Variable::determine_type() { + if (this->preinit_ != NULL) + this->preinit_->determine_types(); + // A variable in a type switch with a nil case will have the wrong // type here. It will have an initializer which is a type guard. // We want to initialize it to the value without the type guard, and |