compiler: Fix field tracking for references in global initializers.

From-SVN: r194073
This commit is contained in:
Ian Lance Taylor 2012-12-03 07:21:16 +00:00
parent 9204da15ef
commit 9cc263b852
1 changed files with 2 additions and 1 deletions

View File

@ -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
// strings, indicating field references, that will wind up in the
// executable will be those for functions that are actually needed.
if (function != NULL)
function->func_value()->set_in_unique_section();
var->set_in_unique_section();