projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e83f45
)
Fix global var initialized to function call with calls as arguments.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 4 Oct 2011 23:16:32 +0000
(23:16 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 4 Oct 2011 23:16:32 +0000
(23:16 +0000)
From-SVN: r179529
gcc/go/gofrontend/gogo.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/gogo.cc
b/gcc/go/gofrontend/gogo.cc
index
9df9402
..
f1f7680
100644
(file)
--- a/
gcc/go/gofrontend/gogo.cc
+++ b/
gcc/go/gofrontend/gogo.cc
@@
-2063,6
+2063,8
@@
Order_eval::variable(Named_object* no)
return TRAVERSE_SKIP_COMPONENTS;
}
+ Expression* orig_init = init;
+
for (Find_eval_ordering::const_iterator p = find_eval_ordering.begin();
p != find_eval_ordering.end();
++p)
@@
-2087,6
+2089,9
@@
Order_eval::variable(Named_object* no)
var->add_preinit_statement(this->gogo_, s);
}
+ if (init != orig_init)
+ var->set_init(init);
+
return TRAVERSE_SKIP_COMPONENTS;
}