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 e6f8644441fc1b16bd85d0203bb557bf2abf940b..45871d75e800944f9e2470b2ff9e84909fe568ef 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 9c317e06a922a64915d3fbd5f84a184c75f72945..092d3e4f1cfe7a5b8e390736a70eb92255e5448c 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;