aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/gogo-tree.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go/gofrontend/gogo-tree.cc')
-rw-r--r--gcc/go/gofrontend/gogo-tree.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/gogo-tree.cc b/gcc/go/gofrontend/gogo-tree.cc
index cd54f2b..06fd4f0 100644
--- a/gcc/go/gofrontend/gogo-tree.cc
+++ b/gcc/go/gofrontend/gogo-tree.cc
@@ -829,6 +829,14 @@ Gogo::write_globals()
}
}
+ // Skip blank named functions.
+ if (no->is_function() && no->func_value()->is_sink())
+ {
+ --i;
+ --count;
+ continue;
+ }
+
if (!no->is_variable())
{
vec[i] = no->get_tree(this, NULL);