projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a14dd08
)
Determine types in global variable preinit blocks.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 10 Feb 2011 22:35:32 +0000
(22:35 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 10 Feb 2011 22:35:32 +0000
(22:35 +0000)
From-SVN: r170025
gcc/go/gofrontend/gogo.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/gogo.cc
b/gcc/go/gofrontend/gogo.cc
index aa66cf4d10986f53c93fbb40ba24c59705f19ad2..e3c56b6318d0b6476d01654c43d2a952b910e697 100644
(file)
--- 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