tree.c (copy_node_stat): Clear DECL_STRUCT_FUNCTION.
authorJakub Jelinek <jakub@redhat.com>
Thu, 23 Aug 2012 10:02:40 +0000 (12:02 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 23 Aug 2012 10:02:40 +0000 (12:02 +0200)
* tree.c (copy_node_stat): Clear DECL_STRUCT_FUNCTION.
fortran/
* trans-decl.c (trans_function_start, generate_coarray_init,
create_main_function, gfc_generate_constructors): Call
allocate_struct_function instead of init_function_start.

From-SVN: r190619

gcc/ChangeLog
gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/tree.c

index 214b40e7abffbcad67abadb3552a13355937a4b1..3fb58835c6e905e03c931ae3d36637dbde952745 100644 (file)
@@ -1,3 +1,7 @@
+2012-08-23  Jakub Jelinek  <jakub@redhat.com>
+
+       * tree.c (copy_node_stat): Clear DECL_STRUCT_FUNCTION.
+
 2012-08-23  Mingjie Xing  <mingjie.xing@gmail.com>
 
        * doc/gty.texi: Fix typo.
index 9fd77d7016e962947a4caf26719eaa7191b664b9..88e0bbd8d54136121f028ea3d1f74d8ee61965df 100644 (file)
@@ -1,3 +1,9 @@
+2012-08-23  Jakub Jelinek  <jakub@redhat.com>
+
+       * trans-decl.c (trans_function_start, generate_coarray_init,
+       create_main_function, gfc_generate_constructors): Call
+       allocate_struct_function instead of init_function_start.
+
 2012-08-22  Tobias Burnus  <burnus@net-b.de>
 
        * trans-expr.c (gfc_copy_class_to_class,
index 6ef00e15c2a9c02f194552ab1d60620924afbd6f..35a859b6d6c2e9ea40aa26bd8555990aa9075222 100644 (file)
@@ -2265,7 +2265,7 @@ trans_function_start (gfc_symbol * sym)
   /* Create RTL for function definition.  */
   make_decl_rtl (fndecl);
 
-  init_function_start (fndecl);
+  allocate_struct_function (fndecl, false);
 
   /* function.c requires a push at the start of the function.  */
   pushlevel ();
@@ -4408,7 +4408,7 @@ generate_coarray_init (gfc_namespace * ns __attribute((unused)))
 
   rest_of_decl_compilation (fndecl, 0, 0);
   make_decl_rtl (fndecl);
-  init_function_start (fndecl);
+  allocate_struct_function (fndecl, false);
 
   pushlevel ();
   gfc_init_block (&caf_init_block);
@@ -4982,7 +4982,7 @@ create_main_function (tree fndecl)
 
   rest_of_decl_compilation (ftn_main, 1, 0);
   make_decl_rtl (ftn_main);
-  init_function_start (ftn_main);
+  allocate_struct_function (ftn_main, false);
   pushlevel ();
 
   gfc_init_block (&body);
@@ -5537,7 +5537,7 @@ gfc_generate_constructors (void)
 
   make_decl_rtl (fndecl);
 
-  init_function_start (fndecl);
+  allocate_struct_function (fndecl, false);
 
   pushlevel ();
 
index c0d349169608e48a94c362458d4ab5308d22e14b..68d5ad0459dbd1d5a4e305d09dc8bd52078e5b84 100644 (file)
@@ -983,6 +983,8 @@ copy_node_stat (tree node MEM_STAT_DECL)
          SET_DECL_INIT_PRIORITY (t, DECL_INIT_PRIORITY (node));
          DECL_HAS_INIT_PRIORITY_P (t) = 1;
        }
+      if (TREE_CODE (node) == FUNCTION_DECL)
+       DECL_STRUCT_FUNCTION (t) = NULL;
     }
   else if (TREE_CODE_CLASS (code) == tcc_type)
     {