980729-1.c:14: Virtual array basic_block_for_insn[82]: element 86 out of bounds in merge_blocks_nomove, at flow.c:2887

Jan Hubicka jh@suse.cz
Mon Jul 30 07:34:00 GMT 2001


> 
> I synced up as of early afternoon today 7/29/01, and see a large
> number (70 maybe?) testsuite failures due to the varray overflowing its bounds.
> It seems improbable that my port is the only one that would hit these
> things.
Yes..

does this patch solve your problem?
i386 testing in progress..


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
  



More information about the Gcc-bugs mailing list