go-gcc.cc (Gcc_backend::write_global_definitions): Don't call gimplify_function_tree.
authorIan Lance Taylor <iant@golang.org>
Thu, 1 Nov 2018 04:21:16 +0000 (04:21 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 1 Nov 2018 04:21:16 +0000 (04:21 +0000)
* 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
gcc/go/go-gcc.cc

index e6f8644..45871d7 100644 (file)
@@ -1,3 +1,9 @@
+2018-10-31  Ian Lance Taylor  <iant@golang.org>
+
+       * 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  <iant@golang.org>
 
        * go-gcc.cc (Gcc_backend::function): Change to use a single flags
index 9c317e0..092d3e4 100644 (file)
@@ -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;