From c5bef33ff98b9ed0cdc4ac2c3029c50e3dc40ca9 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 14 Dec 2014 19:39:15 +0000 Subject: [PATCH] compiler: Fix crash when tracked field used in global initializer. From-SVN: r218722 --- gcc/go/gofrontend/expressions.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2