From 964f78b7e75a4dd4c5c68cec0858270fbfc1d37b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 1 Nov 2018 04:21:16 +0000 Subject: [PATCH] go-gcc.cc (Gcc_backend::write_global_definitions): Don't call gimplify_function_tree. * go-gcc.cc (Gcc_backend::write_global_definitions): Don't call gimplify_function_tree. Instead call allocate_struct_function if necessary. From-SVN: r265710 --- gcc/go/ChangeLog | 6 ++++++ gcc/go/go-gcc.cc | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index e6f8644441f..45871d75e80 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,9 @@ +2018-10-31 Ian Lance Taylor + + * go-gcc.cc (Gcc_backend::write_global_definitions): Don't call + gimplify_function_tree. Instead call allocate_struct_function if + necessary. + 2018-10-29 Ian Lance Taylor * go-gcc.cc (Gcc_backend::function): Change to use a single flags diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index 9c317e06a92..092d3e4f1cf 100644 --- a/gcc/go/go-gcc.cc +++ b/gcc/go/go-gcc.cc @@ -3246,7 +3246,8 @@ Gcc_backend::write_global_definitions( if (decl != error_mark_node) { go_preserve_from_gc(decl); - gimplify_function_tree(decl); + if (DECL_STRUCT_FUNCTION(decl) == NULL) + allocate_struct_function(decl, false); cgraph_node::finalize_function(decl, true); defs[i] = decl; -- 2.30.2