diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-14 19:39:15 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-14 19:39:15 +0000 |
commit | c6292d1d5dc2c42aaaa2731ea8721dbe4b6fcb6f (patch) | |
tree | 37c519c205e9c4b84f64e7205bcffa412973da99 /gcc/go | |
parent | a0665c90b87072e2833c312e7f741eb9ac2a2739 (diff) |
compiler: Fix crash when tracked field used in global initializer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 21f6cd6c3d8..61b80452d99 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -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 |