Commit c5bef33f by Ian Lance Taylor

compiler: Fix crash when tracked field used in global initializer.

From-SVN: r218722
parent 4cbdb699
......@@ -10731,7 +10731,7 @@ Field_reference_expression::do_lower(Gogo* gogo, Named_object* function,
return this;
// References from functions generated by the compiler don't count.
if (function->func_value()->is_type_specific_function())
if (function != NULL && function->func_value()->is_type_specific_function())
return this;
// We have found a reference to a tracked field. Build a call to
......
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