Commit 9cc263b8 by Ian Lance Taylor

compiler: Fix field tracking for references in global initializers.

From-SVN: r194073
parent 9204da15
...@@ -10651,6 +10651,7 @@ Field_reference_expression::do_lower(Gogo* gogo, Named_object* function, ...@@ -10651,6 +10651,7 @@ Field_reference_expression::do_lower(Gogo* gogo, Named_object* function,
// them if they are not referenced. The effect is that the only // them if they are not referenced. The effect is that the only
// strings, indicating field references, that will wind up in the // strings, indicating field references, that will wind up in the
// executable will be those for functions that are actually needed. // executable will be those for functions that are actually needed.
if (function != NULL)
function->func_value()->set_in_unique_section(); function->func_value()->set_in_unique_section();
var->set_in_unique_section(); var->set_in_unique_section();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment