This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] trans.c: Remove gfc_merge_block_scope.


Hi,

Attached is a patch to remove gfc_merge_block_scope as it is unused.

Bootstrapped on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2004-11-07  Kazu Hirata  <kazu@cs.umass.edu>

	* trans.c (gfc_merge_block_scope): Remove.
	* trans.h: Remove the corresponding prototype.

Index: fortran/trans.c
===================================================================
RCS file: /home/kazu/nobackup/gcc-cvs/gcc/gcc/fortran/trans.c,v
retrieving revision 1.19
diff -u -d -p -r1.19 trans.c
--- fortran/trans.c	30 Oct 2004 14:35:23 -0000	1.19
+++ fortran/trans.c	7 Nov 2004 06:46:51 -0000
@@ -184,36 +184,6 @@ gfc_init_block (stmtblock_t * block)
   block->has_scope = 0;
 }
 
-
-/* Sometimes we create a scope but it turns out that we don't actually
-   need it.  This function merges the scope of BLOCK with its parent.
-   Only variable decls will be merged, you still need to add the code.  */
-
-void
-gfc_merge_block_scope (stmtblock_t * block)
-{
-  tree decl;
-  tree next;
-
-  gcc_assert (block->has_scope);
-  block->has_scope = 0;
-
-  /* Remember the decls in this scope.  */
-  decl = getdecls ();
-  poplevel (0, 0, 0);
-
-  /* Add them to the parent scope.  */
-  while (decl != NULL_TREE)
-    {
-      next = TREE_CHAIN (decl);
-      TREE_CHAIN (decl) = NULL_TREE;
-
-      pushdecl (decl);
-      decl = next;
-    }
-}
-
-
 /* Finish a scope containing a block of statements.  */
 
 tree
Index: fortran/trans.h
===================================================================
RCS file: /home/kazu/nobackup/gcc-cvs/gcc/gcc/fortran/trans.h,v
retrieving revision 1.19
diff -u -d -p -r1.19 trans.h
--- fortran/trans.h	4 Oct 2004 13:03:37 -0000	1.19
+++ fortran/trans.h	7 Nov 2004 06:46:51 -0000
@@ -336,8 +336,6 @@ void gfc_start_block (stmtblock_t *);
 /* Finish a statement block.  Also closes the scope if the block was created
    with gfc_start_block.  */
 tree gfc_finish_block (stmtblock_t *);
-/* Merge the scope of a block with its parent.  */
-void gfc_merge_block_scope (stmtblock_t * block);
 
 /* Return the backend label decl.  */
 tree gfc_get_label_decl (gfc_st_label *);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]