This is the mail archive of the gcc-bugs@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]

Re: Bootstrap failure: element 1863 out of bounds in merge_blocks_nomove, at flow.c:2887


> On Mon, 30 Jul 2001, Jan Hubicka wrote:
> >> We have a new bootstrap failure for a plain build on sparc-sun-solaris2.8:
> > I've got equivalent bugreport some time ago.
> > I am just giong to test sparc with following patch.  If you can do it
> > yourself easilly, please let me know
> >
> > Mon Jul 30 16:32:49 CEST 2001  Jan Hubicka  <jh@suse.cz>
> > 	* toplev.c (rest_of_compilation): Recompute block_for_insn
> > 	before post-reload cfg_cleanup.
> > 	* function.c (thread_prologue_epilogue_insns):
> > 	Call set_block_for_new_insns when emitting prologue directly.
> 
> Yes, this indeed makes the bootstrap reach stage3 on sparc-sun-solaris2.8,
> that is, it seems to solve the problem I reported.
I've got sucesfull bootstrap on sparc in meantime too.

OK to install?

Mon Jul 30 16:32:49 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* toplev.c (rest_of_compilation): Recompute block_for_insn
	before post-reload cfg_cleanup.
	* function.c (thread_prologue_epilogue_insns):
	Call set_block_for_new_insns when emitting prologue directly.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.501
diff -c -3 -p -r1.501 toplev.c
*** toplev.c	2001/07/29 17:01:53	1.501
--- toplev.c	2001/07/30 14:32:20
*************** rest_of_compilation (decl)
*** 3473,3491 ****
    verify_flow_info ();
  #endif
  
    /* If optimizing, then go ahead and split insns now.  */
    if (optimize > 0)
      split_all_insns (0);
  
!   cleanup_cfg (0);
  
    /* On some machines, the prologue and epilogue code, or parts thereof,
       can be represented as RTL.  Doing so lets us schedule insns between
       it and the rest of the code and also allows delayed branch
       scheduling to operate in the epilogue.  */
    thread_prologue_and_epilogue_insns (insns);
- 
-   compute_bb_for_insn (get_max_uid ());
  
    if (optimize)
      {
--- 3473,3491 ----
    verify_flow_info ();
  #endif
  
+   compute_bb_for_insn (get_max_uid ());
+ 
    /* If optimizing, then go ahead and split insns now.  */
    if (optimize > 0)
      split_all_insns (0);
  
!   cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
  
    /* On some machines, the prologue and epilogue code, or parts thereof,
       can be represented as RTL.  Doing so lets us schedule insns between
       it and the rest of the code and also allows delayed branch
       scheduling to operate in the epilogue.  */
    thread_prologue_and_epilogue_insns (insns);
  
    if (optimize)
      {
Index: function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.285
diff -c -3 -p -r1.285 function.c
*** function.c	2001/07/29 02:10:41	1.285
--- function.c	2001/07/30 14:32:31
*************** thread_prologue_and_epilogue_insns (f)
*** 7226,7232 ****
  	  inserted = 1;
  	}
        else
! 	emit_insn_after (seq, f);
      }
  #endif
  
--- 7226,7233 ----
  	  inserted = 1;
  	}
        else
! 	set_block_for_new_insns (emit_insn_after (seq, f),
! 		       		 ENTRY_BLOCK_PTR->succ);
      }
  #endif
  


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