Fix global var initialized to function call with calls as arguments.
From-SVN: r179529
This commit is contained in:
parent
0e83f45aa6
commit
1d3e350227
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user