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]

Eliminating Assembler Already Defined Messages for Java Library


This is the second of two patches to ensure that the mainline gcc
bootstraps without complaint.  This patch eliminates repeated
assembler "Error: Symbol .LBB0 already defined." messages when using
gcj to create the Java library.  Compilation of Java on the mainline
was been broken since at or before 06 March.  For more information
including complaints that the code does not bootstrap, see
http://gcc.gnu.org/ml/gcc-bugs/2001-03/msg00173.html,
http://gcc.gnu.org/ml/gcc-bugs/2001-03/msg00172.html,
http://gcc.gnu.org/ml/gcc-bugs/2001-03/msg00221.html,
http://gcc.gnu.org/ml/gcc-bugs/2001-03/msg00254.html,
http://gcc.gnu.org/ml/gcc-bugs/2001-03/msg00259.html, and
http://gcc.gnu.org/ml/gcc-patches/2001-02/msg01499.html.
  
2001-03-12  Jeffrey Oldham  <oldham@codesourcery.com>
  
        * emit-rtl.c (remove_unnecessary_notes): Reverse Richard Kenner's
        2001-02-24 which broke building the Java library.
        * function.c (identify_blocks): Likewise.
        (all_blocks): Likewise.
        * integrate.c (integrate_decl_tree): Likewise.
        * print-tree.c (print_node): Likewise.
        * tree.h (BLOCK_NUMBER): Likewise.
        (struct tree_block): Likewise.

Tested on       i686-pc-linux-gnu
Approved by     Mark Mitchell (mark@codesourcery.com)

Thanks,
Jeffrey D. Oldham
oldham@codesourcery.com
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.166
diff -c -p -r1.166 emit-rtl.c
*** emit-rtl.c	2001/03/07 18:36:23	1.166
--- emit-rtl.c	2001/03/12 21:14:49
*************** remove_unnecessary_notes ()
*** 2907,2913 ****
  		     with the block_stack check above.  */
  		  if (debug_ignore_block (NOTE_BLOCK (insn)))
  		    {
- 		      BLOCK_DEAD (NOTE_BLOCK (insn)) = 1;
  		      remove_insn (tmp);
  		      remove_insn (insn);
  		    }
--- 2907,2912 ----
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.254
diff -c -p -r1.254 function.c
*** function.c	2001/03/02 01:50:49	1.254
--- function.c	2001/03/12 21:14:54
*************** identify_blocks ()
*** 5740,5746 ****
  					 block_stack);
  
    /* If we didn't use all of the subblocks, we've misplaced block notes.  */
!   if (last_block_vector != block_vector + n_blocks)
      abort ();
  
    free (block_vector);
--- 5740,5747 ----
  					 block_stack);
  
    /* If we didn't use all of the subblocks, we've misplaced block notes.  */
!   /* ??? This appears to happen all the time.  Latent bugs elsewhere?  */
!   if (0 && last_block_vector != block_vector + n_blocks)
      abort ();
  
    free (block_vector);
*************** blocks_nreverse (t)
*** 5946,5973 ****
     blocks.  */
  
  static int
! all_blocks (blocks, vector)
!      tree blocks;
       tree *vector;
  {
    int n_blocks = 0;
-   tree block;
  
!   for (block = blocks; block != 0; block = TREE_CHAIN (block))
!     if (!BLOCK_DEAD (block))
!       {
! 	TREE_ASM_WRITTEN (block) = 0;
! 
! 	/* Record this block.  */
! 	if (vector)
! 	  vector[n_blocks] = block;
! 
! 	++n_blocks;
! 
! 	/* Record the subblocks, and their subblocks...  */
! 	n_blocks += all_blocks (BLOCK_SUBBLOCKS (block),
! 				vector ? vector + n_blocks : 0);
!       }
  
    return n_blocks;
  }
--- 5947,5973 ----
     blocks.  */
  
  static int
! all_blocks (block, vector)
!      tree block;
       tree *vector;
  {
    int n_blocks = 0;
  
!   while (block)
!     {
!       TREE_ASM_WRITTEN (block) = 0;
! 
!       /* Record this block.  */
!       if (vector)
! 	vector[n_blocks] = block;
! 
!       ++n_blocks;
! 
!       /* Record the subblocks, and their subblocks...  */
!       n_blocks += all_blocks (BLOCK_SUBBLOCKS (block),
! 			      vector ? vector + n_blocks : 0);
!       block = BLOCK_CHAIN (block);
!     }
  
    return n_blocks;
  }
Index: integrate.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
retrieving revision 1.130
diff -c -p -r1.130 integrate.c
*** integrate.c	2001/02/24 13:15:55	1.130
--- integrate.c	2001/03/12 21:14:56
*************** integrate_decl_tree (let, map)
*** 1684,1695 ****
  
    next = &BLOCK_SUBBLOCKS (new_block);
    for (t = BLOCK_SUBBLOCKS (let); t; t = BLOCK_CHAIN (t))
!     if (!BLOCK_DEAD (t))
!       {
! 	*next = integrate_decl_tree (t, map);
! 	BLOCK_SUPERCONTEXT (*next) = new_block;
! 	next = &BLOCK_CHAIN (*next);
!       }
  
    TREE_USED (new_block) = TREE_USED (let);
    BLOCK_ABSTRACT_ORIGIN (new_block) = let;
--- 1684,1694 ----
  
    next = &BLOCK_SUBBLOCKS (new_block);
    for (t = BLOCK_SUBBLOCKS (let); t; t = BLOCK_CHAIN (t))
!     {
!       *next = integrate_decl_tree (t, map);
!       BLOCK_SUPERCONTEXT (*next) = new_block;
!       next = &BLOCK_CHAIN (*next);
!     }
  
    TREE_USED (new_block) = TREE_USED (let);
    BLOCK_ABSTRACT_ORIGIN (new_block) = let;
Index: print-tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/print-tree.c,v
retrieving revision 1.41
diff -c -p -r1.41 print-tree.c
*** print-tree.c	2001/02/24 13:15:54	1.41
--- print-tree.c	2001/03/12 21:14:57
*************** print_node (file, prefix, node, indent)
*** 584,597 ****
        break;
  
      case 'b':
-       if (BLOCK_ABSTRACT (node))
- 	fprintf (file, " abstract");
-       if (BLOCK_HANDLER_BLOCK (node))
- 	fprintf (file, " handler-block");
-       if (BLOCK_DEAD (node))
- 	fprintf (file, " dead");
-       fprintf (file, " block-number %d", BLOCK_NUMBER (node));
- 
        print_node (file, "vars", BLOCK_VARS (node), indent + 4);
        print_node (file, "supercontext", BLOCK_SUPERCONTEXT (node), indent + 4);
        print_node (file, "subblocks", BLOCK_SUBBLOCKS (node), indent + 4);
--- 584,589 ----
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.229
diff -c -p -r1.229 tree.h
*** tree.h	2001/03/02 21:41:36	1.229
--- tree.h	2001/03/12 21:14:59
*************** struct tree_exp
*** 830,839 ****
     listed in the BLOCK_VARS slot.  */
  #define BLOCK_HANDLER_BLOCK(NODE) (BLOCK_CHECK (NODE)->block.handler_block_flag)
  
- /* Nonzero means the block was deleted as dead and should not be copied
-    when a function is inlined.  */
- #define BLOCK_DEAD(NODE) (BLOCK_CHECK (NODE)->block.dead_flag)
- 
  /* An index number for this block.  These values are not guaranteed to
     be unique across functions -- whether or not they are depends on
     the debugging output format in use.  */
--- 830,835 ----
*************** struct tree_block
*** 845,852 ****
  
    unsigned handler_block_flag : 1;
    unsigned abstract_flag : 1;
!   unsigned dead_flag : 1;
!   unsigned block_num : 29;
  
    union tree_node *vars;
    union tree_node *subblocks;
--- 841,847 ----
  
    unsigned handler_block_flag : 1;
    unsigned abstract_flag : 1;
!   unsigned block_num : 30;
  
    union tree_node *vars;
    union tree_node *subblocks;

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