diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-12-14 19:39:15 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-12-14 19:39:15 +0000 |
commit | c5bef33ff98b9ed0cdc4ac2c3029c50e3dc40ca9 (patch) | |
tree | 37c519c205e9c4b84f64e7205bcffa412973da99 | |
parent | 4cbdb69905032e1f33461af5260beae7bdae3f3b (diff) | |
download | gcc-c5bef33ff98b9ed0cdc4ac2c3029c50e3dc40ca9.zip gcc-c5bef33ff98b9ed0cdc4ac2c3029c50e3dc40ca9.tar.gz gcc-c5bef33ff98b9ed0cdc4ac2c3029c50e3dc40ca9.tar.bz2 |
compiler: Fix crash when tracked field used in global initializer.
From-SVN: r218722
-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 21f6cd6..61b8045 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 |