From the changelog, it looks like a buffer overflow for ee-ar was fixed by compiling binutils with -O0. I wonder if that might fix the bug with ee-as which was the problem I ran into when compiling a 64-bit version of the toolchain. GCC was patched to fix collect2, which doesn't seem to relate to the Cygwin error, but I might have a fix for that.
In schedule_block() in haifa-sched.c, last_clock_var is initialized as 0 while clock_var is initialized as -1. Since clock_var is immediately incremented to 0, they become equal, which might be a problem. This doesn't really change the behavior all that much, so ready.n_ready could still return 0...
Code: Select all
diff -burN gcc-3.2.2-old/gcc/haifa-sched.c gcc-3.2.2/gcc/haifa-sched.c
--- gcc-3.2.2-old/gcc/haifa-sched.c 2009-08-30 01:00:15.198787402 -0400
+++ gcc-3.2.2/gcc/haifa-sched.c 2009-08-30 00:58:27.000000000 -0400
@@ -1641,6 +1641,7 @@
{
struct ready_list ready;
int can_issue_more;
+ int advance, start_clock_var;
/* Head/tail info for this block. */
rtx prev_head = current_sched_info->prev_head;
@@ -1693,15 +1694,19 @@
queue. */
q_ptr = 0;
q_size = 0;
- last_clock_var = 0;
+ last_clock_var = -1;
memset ((char *) insn_queue, 0, sizeof (insn_queue));
/* Start just before the beginning of time. */
clock_var = -1;
+ advance = 0;
/* Loop until all the insns in BB are scheduled. */
while ((*current_sched_info->schedule_more_p) ())
{
+ do
+ {
+ start_clock_var = clock_var;
clock_var++;
/* Add to the ready list all pending insns that can be issued now.
@@ -1718,6 +1723,9 @@
fprintf (sched_dump, ";;\t\tReady list after queue_to_ready: ");
debug_ready_list (&ready);
}
+ advance -= clock_var - start_clock_var;
+ }
+ while (advance > 0);
/* Sort the ready list based on priority. */
ready_sort (&ready);
Edit:I'm not sure if the bootstrap compiler or the cross-compiler needs to be patched with this... since the error seems to lack information on that. I'm guessing since it's erring out on building libstdc++ that xgcc has already been built and the internal compiler error is occurring in it. The cross-compiler works fine with the patch, from what I've tested so far.